Help with PicklingError (Can't pickle x: it's not the same object as x)

T

Tracy Ruggles

sys.platform, sys.version
('freebsd4', '2.2.3 (#2, Nov 17 2003, 17:03:14) \n[GCC 2.95.3 20010315
(release) [FreeBSD]]')

I've poured through pickle.py (line 525) and see where the
PicklingError is being raised, but I can't figure out what conditions
would create the error.

It's testing a class' identity with the object's class that's being
pickled. Somewhere along the line, the original class and the class
of the instance being pickled have parted ways.

Could this have been caused by a reload(module) call somewhere along
the line? I thought that reload would only replace the module in
sys.modules if the file module.py had changed since the original
import. I'm pretty certain that the object's class is not being
altered between the time its module was imported and the time of the
pickling attempt.

Note: the object being pickled is a subclass of 'dict'. I'm creating
a test case where my class is just a subclass of 'object' to see if
the error is related to that...

Thansk,
Tracy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top