Converting a pickle to python3

P

Paulo da Silva

Hi!

I have a big data structure cpickled into a datafile, by python2.
I tried to unpickle it using python3 but got the followin message:
File "/usr/lib64/python3.1/pickle.py", line 1372, in loads
encoding=encoding, errors=errors).load()
_pickle.UnpicklingError: invalid load key, 'x'.

Is there a way to "stream" a class in python2 and then get it back in
python3?

Thanks for any help/comments.
 
P

Paulo da Silva

Em 02-06-2010 04:48, Paulo da Silva escreveu:
Hi!

I have a big data structure cpickled into a datafile, by python2.
I tried to unpickle it using python3 but got the followin message:
File "/usr/lib64/python3.1/pickle.py", line 1372, in loads
encoding=encoding, errors=errors).load()
_pickle.UnpicklingError: invalid load key, 'x'.

....
Please ignore this question. The problem is not the pickle thing but a
compress function I have that has problems related with the new
str/bytes stuff.

Sorry.
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top