From 99a762bcb9e8d93b0fd0917ac119ee2de2609e06 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Wed, 1 Apr 2020 17:42:26 +0200 Subject: [PATCH] Avoid warning for object in position 0 CURA-7333 --- cura/CuraApplication.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index eafd86389e..05f94dffca 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1424,6 +1424,8 @@ class CuraApplication(QtApplication): if file_name in node_name: # if the file_name exists inside the node_name, remove it along with all parenthesis and spaces node_str_index = re.sub(r'[() ]', '', node_name.replace(file_name, "")) + if node_str_index == "": + node_str_index = "0" try: node_int_index = int(node_str_index) except ValueError: