pydstool
pydstool copied to clipboard
PyCont not being pickable
When attempting to save PyCont (ContClass) objects, method saveObject gives error:
Example: (import PyDSTool as dst) DSargs - ode system; ode - generator traj - trajectory pts - some points PC - ContClass object
$ dst.saveObjects([DSargs,ode,traj,pts,PC],'chain3.sav',force=True)
Error:
TypeError Traceback (most recent call last) dst.saveObjects([DSargs,ode,traj,pts,PC],'chain3.sav',force=True) /home/maurizio/Downloads/PyDSTool/utils.pyc in saveObjects(objlist, filename, force) 628 for obj in objlist: 629 try: --> 630 pickle.dump(obj, pklfile, opt) 631 except: 632 if hasattr(obj, 'name'):
TypeError: expected string or Unicode object, NoneType found
Failed to save object 'ContClass of model chain3'
If I leave out the PC object from my list instead, everything seem to work fine.
dill
may now be able to serialize PyCont, according to this