pydstool icon indicating copy to clipboard operation
pydstool copied to clipboard

PyCont not being pickable

Open mdepitta opened this issue 10 years ago • 1 comments

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.

mdepitta avatar Aug 19 '14 16:08 mdepitta

dill may now be able to serialize PyCont, according to this

robclewley avatar Jul 03 '16 22:07 robclewley