Problem summary
Adding metadata via the python api, and then trying to export the asset as a session script results in an error.
Customer reported version
3.1v1
Customer reported platform
centos6
Steps to reproduce
1) Open mari
2) Open a project with Geometry in it
3) Go to Python>Show Console
4) Enter the following code and run it
current_geo = mari.geo.current()current_version = current_geo.currentVersion()bobo = long(350) current_version.setMetadata("bobo", bobo)
5) go to file>session>export session and click export
6) It will fail and spit out a python error in the console.
Reproduced by support
Reproduced in Centos 6.7 & Windows 7
3.1v1, 3.0v3 & 3.0v1
Expected behaviour
For a session to be exported
Actual behaviour
You get an error:
_ File "../mari/3.1v1/Media/Scripts/Mari/session/types/metadata.py", line 266, in fromMariObject_
metadata.metadata[key] = mst._serialize(mariObject.metadata(key))
_ File "../mari/3.1v1/Media/Scripts/Mari/session/types/init.py", line 242, in serialize
raise ValueError("Cannot serialize object '%s'" %str(var))
_ ValueError: Cannot serialize object '350'_