j8sr0230 / Nodes

Visual scripting workbench for FreeCAD
GNU Lesser General Public License v2.1
74 stars 11 forks source link

Unable to open saved nodes file #107

Closed macdroid53 closed 1 year ago

macdroid53 commented 1 year ago

I'm adding this here because I've now duplicated this multiple times.

using File>Save produces a file with no extension the "no extension" file is seen in the File>Open dialog only if "All Files" is selected it is seen if the extension .json is added selecting the file produces the errors shown below. `08:53:25 Traceback (most recent call last): 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_scene.py", line 397, in deserialize new_node = self.getNodeClassFromData(node_data)(self) 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./nodes/viz/viz_compound_viewer.py", line 46, in init self.fc_obj = App.ActiveDocument.addObject("Part::Feature", "CViewer") 08:53:25 AttributeError: 'NoneType' object has no attribute 'addObject' 08:53:25 Traceback (most recent call last): 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_scene.py", line 397, in deserialize new_node = self.getNodeClassFromData(node_data)(self) 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./nodes/viz/viz_compound_viewer.py", line 46, in init self.fc_obj = App.ActiveDocument.addObject("Part::Feature", "CViewer") 08:53:25 AttributeError: 'NoneType' object has no attribute 'addObject' 08:53:25 Traceback (most recent call last): 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_scene.py", line 327, in loadFromFile self.deserialize(data) 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_scene.py", line 435, in deserialize new_edge = Edge(self).deserialize(edge_data, hashmap, restore_id, *args, **kwargs) 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_edge.py", line 301, in deserialize self.end_socket = hashmap[data['end']] 08:53:25 KeyError: 140386114026368 08:53:25 Traceback (most recent call last): 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./core/nodes_default_node.py", line 297, in eval return self.eval_primer()[index] 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./core/nodes_default_node.py", line 338, in eval_primer self.markDescendantsDirty() 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_node.py", line 345, in markDescendantsDirty for other_node in self.getChildrenNodes(): 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_node.py", line 414, in getChildrenNodes other_node = edge.getOtherSocket(self.outputs[ix]).node 08:53:25 AttributeError: 'NoneType' object has no attribute 'node' 08:53:25
During handling of the above exception, another exception occurred:

08:53:25 Traceback (most recent call last): 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./core/nodes_window.py", line 137, in onFileOpen if nodeeditor.fileLoad(file_name): 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./core/nodes_sub_window.py", line 63, in fileLoad self.do_eval_outputs() 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./core/nodes_sub_window.py", line 56, in do_eval_outputs node.eval() 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./core/nodes_default_node.py", line 302, in eval self.markDescendantsDirty() 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_node.py", line 345, in markDescendantsDirty for other_node in self.getChildrenNodes(): 08:53:25 File "/home/mac/.local/share/FreeCAD/Mod/Nodes/./lib/nodeeditor/node_node.py", line 414, in getChildrenNodes other_node = edge.getOtherSocket(self.outputs[ix]).node 08:53:25 AttributeError: 'NoneType' object has no attribute 'node' 08:53:25 `

I have installed both from Addon manager and by hand from github with the same results.

I attempted to reproduce "docs/nodes_align_shape.gif", but it was not producing the animation as shown, the boxes weren't aligned with the surface of the sphere. Unfortunately, after saving, exiting FC, and restarting FC, the node file can't be loaded as discussed above. Once I can load the file I can start a discussion about that.

I'm happy to provide more info...

`OS: Debian GNU/Linux 11 (bullseye) (XFCE/lightdm-xsession) Word size of FreeCAD: 64-bit Version: 0.21.31182 (Git) Build type: Release Branch: master Hash: 3148ea6651bcc4af7fdebf1bdb7fe131502341a9 Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.1 Locale: English/United States (en_US) Installed mods: ...