You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With FreeCAD 0.21.2, when save file with Assembly3, on console printed errors
PropertyPythonObject::toString(): failed for <class 'freecad.asm3.assembly.Assembly'>
Traceback (most recent call last):
File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
<class 'TypeError'>: Object of type set is not JSON serializable
PropertyPythonObject::toString(): failed for <class 'freecad.asm3.assembly.AsmConstraintGroup'>
...
It seems that when using python >=3.11 you need to rename the __getstate__/__setstate__ methods to dumps/loads.
I tried doing this locally and now there are no errors.
I am also having an error when saving from asm3 with last LinkStable on Windows 10. When it happens FC is frozed and I have to kill it in task manager.
Saving same document with last LinkStable in Linux doesn't give any error. So may be it is a similar but a different problem than here reported.
With FreeCAD 0.21.2, when save file with Assembly3, on console printed errors
It seems that
class 'TypeError' Object of type FeaturePython is not JSON serializable
the problem was related with
git commit fbe2fef
It seems that when using python >=3.11 you need to rename the
__getstate__
/__setstate__
methods todumps
/loads
.I tried doing this locally and now there are no errors.
My setup
The text was updated successfully, but these errors were encountered: