LCInterlocking icon indicating copy to clipboard operation
LCInterlocking copied to clipboard

Receive error when saving project after using LC Interlocking features.

Open TsetTsyung opened this issue 1 year ago • 1 comments

Hi all - please bear with me. My GitHub experience is minimal.

FreeCAD Version: 0.21.2 LCInterlocking Version: Up-To-Date (Unknown Version)

After using the 'Living Hinge' module to make a living hinge and attempting to save the project, I receive the following error:

09:14:14  PropertyPythonObject::toString(): failed for 
09:14:14  Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
: Object of type HingesProperties is not JSON serializable
09:14:14  PropertyPythonObject::toString(): failed for 
09:14:14  Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
: Object of type ViewProviderDocumentObject is not JSON serializable

When attempting to save after using the Tabs feature, I receive this error message:

09:22:59  PropertyPythonObject::toString(): failed for 
09:22:59  Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
: Object of type TabProperties is not JSON serializable
09:22:59  PropertyPythonObject::toString(): failed for 
09:22:59  Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
: Object of type MaterialProperties is not JSON serializable
09:22:59  PropertyPythonObject::toString(): failed for 
09:22:59  Traceback (most recent call last):
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\Program Files\FreeCAD 0.21\bin\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
: Object of type ViewProviderDocumentObject is not JSON serializable

In both situations, the project does actually save, but the above messages are posted into the console (originally making me think it wasn't saving...)

Hopefully this information is of use. Thank you for your work on this awesome and extremely useful module.

Mike

TsetTsyung avatar May 14 '24 08:05 TsetTsyung

[FACEPALM] - I have no idea why the formatting of the error message got butchered. G2G right now, but will research how to properly format and will update/post new messages upon my return.

UPDATE: Updated original content to use "[<]pre[>][<]code[>]---[<]/code[>][<]/pre[>]" instead of the usual backticks. Hopefully this doesn't screw up the visualisation for anyone.

TsetTsyung avatar May 14 '24 08:05 TsetTsyung