[Python-bugs-list] [ python-Bugs-501795 ] pickle/cPickle EOL incompatibility
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 10 Jan 2002 06:41:32 -0800
Bugs item #501795, was opened at 2002-01-10 06:21
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=501795&group_id=5470
Category: Extension Modules
Group: Python 2.2
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: James Weatherall (sleeper)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: pickle/cPickle EOL incompatibility
Initial Comment:
There seems to be a problem loading pickled data
written under Windows (EOL = \r\n) from within Linux
(EOL = \n). The problem manifests as being unable to
import the required module. Reading Linux pickle data
under Windows works fine.
e.g. a pickle file containing objects from module Foo
will fail to import Foo, because it *actually* tries
to import "Foo\r", and obviously can't.
(Seems unlikely that noone else has noticed this, so
perhaps I'm just being spectacularly dumb.)
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-01-10 06:41
Message:
Logged In: YES
user_id=6380
On Windows, you have to open files containing pickles in
binary mode ("rb", "wb").
Closing as Invalid.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=501795&group_id=5470