Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42986 > unrolled thread

Re: Help: pickle module unable to load "rb" mode files in linux

Started bySurya Kasturi <suryak@ieee.org>
First post2013-04-07 15:10 +0530
Last post2013-04-07 15:10 +0530
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Help: pickle module unable to load "rb" mode files in linux Surya Kasturi <suryak@ieee.org> - 2013-04-07 15:10 +0530

#42986 — Re: Help: pickle module unable to load "rb" mode files in linux

FromSurya Kasturi <suryak@ieee.org>
Date2013-04-07 15:10 +0530
SubjectRe: Help: pickle module unable to load "rb" mode files in linux
Message-ID<mailman.237.1365327662.3114.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

I am attaching the file which has to be read.. please take a look into it.
The actual source code can be observed at
https://github.com/scipy/SciPyCentral/blob/master/scipy_central/rest_comments/views.py#L235


when we use "rb" mode in windows, its working. but its not working in linux
system (particularly CentOS)



On Tue, Apr 2, 2013 at 8:50 PM, Peter Otten <__peter__@web.de> wrote:

> Surya Kasturi wrote:
>
> > Hi, hope you can help me on it..
> >
> > with open(pickle_f, 'r') as fhand:
> >         obj = pickle.load(fhand)
> >
> >
> > This works on linux but not in windows until  I use "rb" mode while
> > creating file object. Surprisingly, the "rb" mode is not working on
> > Linux.. raising EOFError.
> >
> > Why is this happening?
>
> I don't know.
>
> Please give a complete self-contained example that uses "wb" to write the
> file and "rb" to read it, and that fails on Linux. Don't forget to tell us
> the version of Python you used to run that script.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web