SebKuzminsky / pycam

Other
340 stars 98 forks source link

Error when opening pycam with saved default workspace #130

Closed valeriob01 closed 5 years ago

valeriob01 commented 5 years ago

./run_gui.py

Enabled 4 parallel local processes Storing a state revision (1/20)

(run_gui.py:6383): Gtk-CRITICAL **: gtk_box_pack: assertion '_gtk_widget_get_parent (child) == NULL' failed

(run_gui.py:6383): Gtk-CRITICAL **: gtk_box_pack: assertion '_gtk_widget_get_parent (child) == NULL' failed Font directory: /home/sel/Downloads/pycam/share/fonts Loading workspace from file: /root/.pycam/workspace.yml Reverting collection changes due to error: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object/apply:pycam.Toolpath.MotionGrid.SpiralDirection' in "", line 61, column 23: spiral_direction: !!python/object/apply:pycam.Tool ... ^ Imported 0 items into 'tools' Imported 0 items into 'processes' Imported 0 items into 'bounds' Imported 0 items into 'tasks' Imported 0 items into 'models' Imported 0 items into 'toolpaths' Imported 0 items into 'export_settings' Imported 0 items into 'exports' Traceback (most recent call last): File "./run_gui.py", line 293, in main_func() File "./run_gui.py", line 281, in main_func exit_code = execute(parser, args, pycam) File "./run_gui.py", line 209, in execute show_gui() File "./run_gui.py", line 135, in show_gui gui.load_startup_workspace() File "/home/sel/Downloads/pycam/pycam/Gui/init.py", line 218, in load_startup_workspace default_content=DEFAULT_WORKSPACE) File "/home/sel/Downloads/pycam/pycam/Gui/init.py", line 247, in load_workspace_from_file self.load_workspace_from_description(content) File "/home/sel/Downloads/pycam/pycam/Gui/init.py", line 287, in load_workspace_from_description reset=True) File "/home/sel/Downloads/pycam/pycam/Flow/parser.py", line 36, in parse_yaml parsed = yaml.safe_load(source) File "/usr/lib/python3/dist-packages/yaml/init.py", line 94, in safe_load return load(stream, SafeLoader) File "/usr/lib/python3/dist-packages/yaml/init.py", line 72, in load return loader.get_single_data() File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 37, in get_single_data return self.construct_document(node) File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 46, in construct_document for dummy in generator: File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 398, in construct_yaml_map value = self.construct_mapping(node) File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 204, in construct_mapping return super().construct_mapping(node, deep=deep) File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 129, in construct_mapping value = self.construct_object(value_node, deep=deep) File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 86, in construct_object data = constructor(self, node) File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 414, in construct_undefined node.start_mark) yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object/apply:pycam.Toolpath.MotionGrid.SpiralDirection' in "", line 61, column 23: spiral_direction: !!python/object/apply:pycam.Tool ...

sumpfralle commented 5 years ago

Thank you for pointing this issue out! The creation of the yaml dump is fixed now. Probably you will need to remove your (broken) workspace file or remove the spiral_direction line from it.