From 9a93f6866a644fb4d1992b36c37154dafa1a1561 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 7 Nov 2018 12:03:32 +0100 Subject: [PATCH 1/3] Fix crash of toolbox when metadata got corrupted --- plugins/Toolbox/src/Toolbox.py | 38 ++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 25e7656999..43e1f5b3d9 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -265,21 +265,25 @@ class Toolbox(QObject, Extension): raise Exception("Failed to create Marketplace dialog") return dialog - def _convertPluginMetadata(self, plugin: Dict[str, Any]) -> Dict[str, Any]: - formatted = { - "package_id": plugin["id"], - "package_type": "plugin", - "display_name": plugin["plugin"]["name"], - "package_version": plugin["plugin"]["version"], - "sdk_version": plugin["plugin"]["api"], - "author": { - "author_id": plugin["plugin"]["author"], - "display_name": plugin["plugin"]["author"] - }, - "is_installed": True, - "description": plugin["plugin"]["description"] - } - return formatted + def _convertPluginMetadata(self, plugin_data: Dict[str, Any]) -> Optional[Dict[str, Any]]: + try: + formatted = { + "package_id": plugin_data["id"], + "package_type": "plugin", + "display_name": plugin_data["plugin"]["name"], + "package_version": plugin_data["plugin"]["version"], + "sdk_version": plugin_data["plugin"]["api"], + "author": { + "author_id": plugin_data["plugin"]["author"], + "display_name": plugin_data["plugin"]["author"] + }, + "is_installed": True, + "description": plugin_data["plugin"]["description"] + } + return formatted + except: + Logger.log("w", "Unable to convert plugin meta data %s", str(plugin_data)) + return None @pyqtSlot() def _updateInstalledModels(self) -> None: @@ -299,7 +303,9 @@ class Toolbox(QObject, Extension): old_metadata = self._plugin_registry.getMetaData(plugin_id) new_metadata = self._convertPluginMetadata(old_metadata) - + if new_metadata is None: + # Something went wrong converting it. + continue self._old_plugin_ids.add(plugin_id) self._old_plugin_metadata[new_metadata["package_id"]] = new_metadata From 58a01816aa6eaef630c8fd711102f0e4eca21a6b Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 7 Nov 2018 13:39:06 +0100 Subject: [PATCH 2/3] Remove quality profiles for PLA in the UMS5 with the CC 0.6 print core. PLA is compatible with the print core but we don't want to provide profiles because they were not fully tested. Contributes to CURA-5900. --- .../um_s5_cc0.6_PLA_Draft_Print.inst.cfg | 42 ------------------- .../um_s5_cc0.6_PLA_Fast_Print.inst.cfg | 42 ------------------- 2 files changed, 84 deletions(-) delete mode 100644 resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Draft_Print.inst.cfg delete mode 100644 resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Fast_Print.inst.cfg diff --git a/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Draft_Print.inst.cfg deleted file mode 100644 index 9045c36fbe..0000000000 --- a/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Draft_Print.inst.cfg +++ /dev/null @@ -1,42 +0,0 @@ -[general] -version = 4 -name = Fast -definition = ultimaker_s5 - -[metadata] -setting_version = 5 -type = quality -quality_type = draft -weight = -3 -material = generic_pla -variant = CC 0.6 - -[values] -cool_fan_full_at_height = =layer_height_0 + 2 * layer_height -cool_fan_speed_max = =100 -cool_min_speed = 2 -gradual_infill_step_height = =3 * layer_height -infill_line_width = =round(line_width * 0.65 / 0.75, 2) -infill_pattern = triangles -line_width = =machine_nozzle_size * 0.9375 -machine_nozzle_cool_down_speed = 0.75 -machine_nozzle_heat_up_speed = 1.6 -material_final_print_temperature = =max(-273.15, material_print_temperature - 15) -material_initial_print_temperature = =max(-273.15, material_print_temperature - 10) -material_print_temperature = =default_material_print_temperature + 10 -material_standby_temperature = 100 -prime_tower_enable = True -retract_at_layer_change = False -speed_print = 45 -speed_topbottom = =math.ceil(speed_print * 35 / 45) -speed_wall = =math.ceil(speed_print * 40 / 45) -speed_wall_x = =speed_wall -speed_wall_0 = =math.ceil(speed_wall * 35 / 40) -support_angle = 70 -support_line_width = =line_width * 0.75 -support_pattern = triangles -support_xy_distance = =wall_line_width_0 * 1.5 -top_bottom_thickness = =layer_height * 4 -wall_line_width = =round(line_width * 0.75 / 0.75, 2) -wall_line_width_x = =round(wall_line_width * 0.625 / 0.75, 2) -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Fast_Print.inst.cfg deleted file mode 100644 index 8e747bb06f..0000000000 --- a/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Fast_Print.inst.cfg +++ /dev/null @@ -1,42 +0,0 @@ -[general] -version = 4 -name = Normal -definition = ultimaker_s5 - -[metadata] -setting_version = 5 -type = quality -quality_type = fast -weight = -2 -material = generic_pla -variant = CC 0.6 - -[values] -cool_fan_full_at_height = =layer_height_0 + 2 * layer_height -cool_fan_speed_max = =100 -cool_min_speed = 2 -gradual_infill_step_height = =3 * layer_height -infill_line_width = =round(line_width * 0.65 / 0.75, 2) -infill_pattern = triangles -line_width = =machine_nozzle_size * 0.9375 -machine_nozzle_cool_down_speed = 0.75 -machine_nozzle_heat_up_speed = 1.6 -material_final_print_temperature = =max(-273.15, material_print_temperature - 15) -material_initial_print_temperature = =max(-273.15, material_print_temperature - 10) -material_print_temperature = =default_material_print_temperature + 10 -material_standby_temperature = 100 -prime_tower_enable = True -retract_at_layer_change = False -speed_print = 45 -speed_topbottom = =math.ceil(speed_print * 35 / 45) -speed_wall = =math.ceil(speed_print * 40 / 45) -speed_wall_x = =speed_wall -speed_wall_0 = =math.ceil(speed_wall * 35 / 40) -support_angle = 70 -support_line_width = =line_width * 0.75 -support_pattern = triangles -support_xy_distance = =wall_line_width_0 * 1.5 -top_bottom_thickness = =layer_height * 4 -wall_line_width = =round(line_width * 0.75 / 0.75, 2) -wall_line_width_x = =round(wall_line_width * 0.625 / 0.75, 2) -wall_thickness = =wall_line_width_0 + wall_line_width_x From c5a9c6c6cce35fc3f943ca37f83abd9299a9e393 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 8 Nov 2018 09:48:52 +0100 Subject: [PATCH 3/3] Add translation for missing line in Korean This one was not translated. Contributes to issue CURA-5870. --- resources/i18n/ko_KR/cura.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/i18n/ko_KR/cura.po b/resources/i18n/ko_KR/cura.po index 8141cdf63e..6f32d46cd7 100644 --- a/resources/i18n/ko_KR/cura.po +++ b/resources/i18n/ko_KR/cura.po @@ -915,7 +915,7 @@ msgstr "프로파일 {0}에는 정확하지 않은 데이 #, python-brace-format msgctxt "@info:status Don't translate the XML tags !" msgid "The machine defined in profile {0} ({1}) doesn't match with your current machine ({2}), could not import it." -msgstr "The machine defined in profile {0} ({1}) doesn’t match with your current machine ({2}), could not import it." +msgstr "프로필 {0}({1})에 정의된 제품이 현재 제품({2})과 일치하지 않으므로, 불러올 수 없습니다." #: /home/ruben/Projects/Cura/cura/Settings/CuraContainerRegistry.py:312 #, python-brace-format