kumoshk
October 18th, 2008, 07:23 AM
I'm making a flashcard program using the UTF-8 encoding.
Quite some time ago, I used the same code to save and load and it worked fine.
Now, however (my operating system, and consequently probably my Python version, have been updated extensively since), I get weird errors I never used to get (depending on whether I use pickle or cPickle):
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
KeyError: u"p0\n(dp1\nS'numSides'\np2\nI2\nsS'shown'\np3\nI1\n sS'prevCard'"
File "main.py", line 129, in LoadList
loadedList = cPickle.load(FILE)
cPickle.UnpicklingError: pickle data was truncated
Can anyone else using Hardy Heron and Python 2.5.2 get cPickle or pickle to work to both save and load UTF-8? If so, how do you manage it?
I think it might be a bug relating to the encoding.
Quite some time ago, I used the same code to save and load and it worked fine.
Now, however (my operating system, and consequently probably my Python version, have been updated extensively since), I get weird errors I never used to get (depending on whether I use pickle or cPickle):
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
KeyError: u"p0\n(dp1\nS'numSides'\np2\nI2\nsS'shown'\np3\nI1\n sS'prevCard'"
File "main.py", line 129, in LoadList
loadedList = cPickle.load(FILE)
cPickle.UnpicklingError: pickle data was truncated
Can anyone else using Hardy Heron and Python 2.5.2 get cPickle or pickle to work to both save and load UTF-8? If so, how do you manage it?
I think it might be a bug relating to the encoding.