[Baypiggies] pickle misbehavior
Vikram K
kpguy1975 at gmail.com
Sun Dec 19 08:15:51 CET 2010
tried with f = open('totalpepfinalpickle.txt', 'b') and got the following
error:
Traceback (most recent call last):
File "C:\Users\K\filtertest3.py", line 40, in <module>
f = open ('totalpepfinalpickled.txt', 'b')
ValueError: mode string must begin with one of 'r', 'w', 'a' or 'U', not 'b'
>>>
Also tried with f = open('totalpepfinalpickle.txt', 'rb') and got the usual
error:
Traceback (most recent call last):
File "C:\Users\K\filtertest3.py", line 42, in <module>
x = pickle.load(f)
ValueError: insecure string pickle
On Thu, Dec 16, 2010 at 2:50 PM, Simeon Franklin <simeonf at gmail.com> wrote:
> On Thu, Dec 16, 2010 at 11:38 AM, Vikram K <kpguy1975 at gmail.com> wrote:
> > In B i am unpickling and these are the relevant lines:
> > f = open ('totalpepfinalpickled.txt')
> >
> > x = pickle.load(f)
> >
> > A runs fine on execution. On running B, i got the following error:
>
> Does this still happen if you open the pickle file in binary mode? Eg:
>
> >>> f = open('totalpepfinalpickled.txt', 'b')
>
> -regards
> Simeon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20101219/377b6ab8/attachment.html>
More information about the Baypiggies
mailing list