[Tutor] Further pickle problem :0(

Joe Batt joebatt at hotmail.co.uk
Sat Nov 19 16:33:16 CET 2011


Hi all again
Thank you to those that have helped me previously with this problem it is appreciated.
Thanks to Walter I have actually found the pickle file that I am trying to restore to a variable however I am getting the following error
Traceback (most recent call last):  File "/Users/joebatt/Desktop/python/pickling puzzle 5.py", line 39, in <module>    a=pickle.load(file)  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/encodings/ascii.py", line 26, in decode    return codecs.ascii_decode(input, self.errors)[0]UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 8: ordinal not in range(128)
The simple program I am using to 'depickle' is
file=open('///Users/joebatt/Desktop/banner.p.webarchive','r')a=pickle.load(file)file.close()print (a)
I am using Python 3 and working through the Python Challenges on www.pythonchallenge.com, the site is a few years old and I was thinking that possibly it is based around Python 2.x ??? If thats the case is the error due to me using 3 as opposed to 2.x
Many thanksJoe 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111119/a319b6af/attachment.html>


More information about the Tutor mailing list