Jennifer,

When adding a Python object to a VLArray, PyTables first pickles the
object.  It looks like you're trying to add something that can't be
pickled.  Check the type of the 'state' variable in the first line of the
stack trace and make sure it's something that can be pickled.  See [1] for
more details.

Hope that helps,
Josh

[1]:
http://docs.python.org/2/library/pickle.html#what-can-be-pickled-and-unpickled




On Wed, Dec 12, 2012 at 4:58 AM, Jennifer Flegg <jennifer.fl...@wwarn.org>wrote:

> Hi All,
> I'm getting errors of this sort when I use pytables to store data in hdf5
> format.
> Has anyone come across this before? Is there a fix?
> Thanks,
> Jennifer
>
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7
> /lib/python2.7/site-packages/pymc/database/hdf5.py", line 474,
> in savestate    s.append(state)
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7
> /lib/python2.7/site-packages/tables/vlarray.py", line 462, in append
>     sequence = atom.toarray(sequence)
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7
> /lib/python2.7/site-packages/tables/atom.py", line 1000, in toarray
>     buffer_ = self._tobuffer(object_)
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7
> /lib/python2.7/site-packages/tables/atom.py", line 1112, in _tobuffer
>     return cPickle.dumps(object_, cPickle.HIGHEST_PROTOCOL)
> PicklingError: Can't pickle <type 'function'>:
> attribute lookup __builtin__.function failed
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to