pickle error/instancemethod

Gregor Kling gregor.kling at its.fh-giessen.de
Tue Sep 4 04:03:40 EDT 2007


Hello,

I have some of these nefarious pickle errors I do not understand,
maybe some of you have a clue.

This is what I get
(nd is the object which I want to pickle [cPickle.dumps(nd,2)], with
the printout of nd.__dict__):

 ERROR Error: Can't pickle <type 'instancemethod'>: attribute lookup
__builtin__.instancemethod failed, nd: {'dvzLogger':
<dvzrv.DVZlogging.DVZlogger.DVZlogger object at 0x8b7
6bac>, '_DVZnetzDataBase__netzentries':
[<dvzrv.db.containers.DVZnetzData.DVZnetzDataEntry object a
t 0x8a8e08c>], '_DVZnetzDataBase__option_fqdn_alias':
set(['a.b.c']), '_DVZnetzDataBase__admins': set([]),
'_DVZnetzDataBase__aliasentries': []}


I follow the hints on http://docs.python.org/lib/node318.html, so I
do not understand the source of the problem. I do not try to pickle
an instancemethod directly. The dict does apparently contains only
top level tuples, lists, sets, and dictionaries, classes/instances.

So if more Data is needed to analyse the problem - demand.

gfk

-- 
gfk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6145 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20070904/532795b1/attachment.bin>


More information about the Python-list mailing list