Mesh.from_json()

I have used Mesh.from_json() for a long time. Today strangely it gives me the following error:

Message: malformed string

Traceback:
line 79, in _convert, “C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\ast.py”
line 80, in literal_eval, “C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\ast.py”
line 302, in data, “C:\Users\msalma\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\datastructures\mesh\core\halfedge.py”
line 376, in from_json, “C:\Users\msalma\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\datastructures\mesh\core\halfedge.py”

My guess is that the compas version in which the .json file was originally created is older than the one where you are trying to load it. Does the problem persist if you try loading the .json file with an older compas?

2 Likes

Hi Rafael. Thanks for the hint! I think that was the problem. It is solved now!

2 Likes

hi,

would you mind filing an issue about this?
although the current version of dealing with json data is preferred, it should not fail on older versions…

thanks

The issue is posted!

1 Like

Linking the topic to the issue: https://github.com/compas-dev/compas/issues/567