cPickle vs pickle discrepancy

Z

Zac Burns

Greetings,

I have a module that attempts to pickle classes defined in that module.

I get an error of the form:
PicklingError: Can't pickle <class 'Module.SubModule.Class'>: import
of module Module.SubModule failed
when using cPickle (protocol -1, python version 2.5.1).

The module has already been imported and is in sys.modules when the
exception is raised.

Using pickle instead of cPickle works, but the section of the code is
performance critical.

How can this be worked around?

--
Zachary Burns
(407)590-4814
Aim - Zac256FL
Production Engineer (Digital Overlord)
Zindagi Games
 

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

Members online

No members online now.

Forum statistics

Threads
473,965
Messages
2,570,148
Members
46,710
Latest member
FredricRen

Latest Threads

Top