I created a visualization using mayavi2/mlab in Python and I need a way to share it with my supervisor. He doesn't have any programming skills, so I want him to simply open the model with all the planes and colors that I created and be able to play around with it.
I did this in Python to save it to a file:
engine = mlab.get_engine()
engine.save_visualization('./Results/3DModel.mv2')
When I try to open '3DModel.mv2' using the Mayavi2 (envisage backend) user interface via 'File > Load Visualization' I get this exception:
Exception
In /usr/local/lib/python2.7/dist-packages/apptools/persistence/state_pickler.py:924
TypeError: Given object is neither a file or String (in _get_file_read)
Thanks in advance!
I don't know why these functions works such way but I have modified the source file state_pickler.py and delete state_pickler.pyc:
And now it is working. The type of f was unicode.