chbergmann / OpticsWorkbench

GNU Lesser General Public License v3.0
80 stars 22 forks source link

Error on saving #5

Closed wohltat closed 3 years ago

wohltat commented 3 years ago

There are error messages when saving. But i cannot see what effect that has. I can load the file successfully despite the error message.

22:44:44  PropertyPythonObject::toString(): failed for <class 'OpticalObject.OpticalObjectViewProvider'>
22:44:44  Traceback (most recent call last):
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/__init__.py", line 234, in dumps
    return cls(
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 201, in encode
    chunks = list(chunks)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
<class 'TypeError'>: Object of type FeaturePython is not JSON serializable
22:44:44  PropertyPythonObject::toString(): failed for <class 'OpticalObject.OpticalObjectViewProvider'>
22:44:44  Traceback (most recent call last):
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/__init__.py", line 234, in dumps
    return cls(
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 201, in encode
    chunks = list(chunks)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
<class 'TypeError'>: Object of type FeaturePython is not JSON serializable
22:44:44  PropertyPythonObject::toString(): failed for <class 'OpticalObject.OpticalObjectViewProvider'>
22:44:44  Traceback (most recent call last):
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/__init__.py", line 234, in dumps
    return cls(
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 201, in encode
    chunks = list(chunks)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/tmp/.mount_FreeCAVUFeyP/usr/lib/python3.9/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
<class 'TypeError'>: Object of type FeaturePython is not JSON serializable

image

wohltat commented 3 years ago

seems to be connected to https://forum.freecadweb.org/viewtopic.php?t=27830

chbergmann commented 3 years ago

fixed

wohltat commented 3 years ago

Great. Was hoping for this one. Now the autosave is not triggering an error anymore every few minutes.