On 19/11/11 19:37, Joe Batt wrote:
File "/Users/joebatt/Desktop/python/pickling puzzle 5.py", line 39, in
<module>
a=pickle.load(file)
_pickle.UnpicklingError: unpickling stack underflow
when I am running the following
import pickle
file=open('///Users/joebatt/Desktop/banner.p.webarchive','rb')
I don't know why the error, it suggests the data file is corrupted.
You may need to fetch another copy. Make sure you save the file rather
than try to open it so that it downloads in binary format or it may be
truncated...
However, having downloaded it I'm not sure why you are specifying the
filename with /// at the front. It looks like you are on Linux? You
should only need
file=open('/Users/joebatt/Desktop/banner.p.webarchive','rb')
But that shouldn't really make any difference to the end result.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor