[Tutor] Fw: Further pickle problem :0(

ALAN GAULD alan.gauld at btinternet.com
Sat Nov 19 23:47:17 CET 2011


Forwarding to list

Always use ReplyAll, it keeps everyone involved.

I don't know what the error means, hopefully somebody 
else does...
 Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/




----- Forwarded Message ----
From: Joe Batt <joebatt at hotmail.co.uk>
To: alan.gauld at btinternet.com
Sent: Saturday, 19 November, 2011 18:09:24
Subject: RE: [Tutor] Further pickle problem :0(

 
Thanks for your help Alan, I tried that previously and get the error

Traceback (most recent call last):
  File "/Users/joebatt/Desktop/python/pickling puzzle 5.py", line 39, in 
<module>
    a=pickle.load(file)
_pickle.UnpicklingError: unpickling stack underflow

Any ideas?

Thanks
Joe
(ps great web site, very helpful)

> To: tutor at python.org
> From: alan.gauld at btinternet.com
> Date: Sat, 19 Nov 2011 16:54:44 +0000
> Subject: Re: [Tutor] Further pickle problem :0(
> 
> On 19/11/11 15:33, Joe Batt wrote:
> 
> > file=open('///Users/joebatt/Desktop/banner.p.webarchive','r')
> 
> Try opening it on binary mode.
> Pickle files are not plain text.
> 
> > a=pickle.load(file)
> > file.close()
> > print (a)
> 
> -- 
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111119/fa943861/attachment.html>


More information about the Tutor mailing list