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


Groups > comp.lang.python > #42576

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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'obj': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:files': 0.09; 'subject:module': 0.09; 'subject:Help': 0.11; 'python': 0.11; 'windows': 0.15; 'received:80.91.229.3': 0.16; 'received:dip.t-dialin.net': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-dialin.net': 0.16; 'wrote:': 0.18; 'example': 0.22; 'creating': 0.23; 'header:User- Agent:1': 0.23; 'script.': 0.24; 'header:X-Complaints-To:1': 0.27; 'mode': 0.30; 'linux.': 0.31; 'object.': 0.31; 'file': 0.32; 'know.': 0.32; 'run': 0.32; 'linux': 0.33; 'but': 0.35; 'version': 0.36; 'raising': 0.36; 'hi,': 0.36; 'to:addr:python-list': 0.38; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'tell': 0.60; 'hope': 0.61; 'complete': 0.62; 'happening?': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: Help: pickle module unable to load "rb" mode files in linux
Date Tue, 02 Apr 2013 17:20:19 +0200
Organization None
References <CAArdDCqpMq=VNJTfpXY3CR5vRetma9HYO_6DnmLSry_bQ5wSkg@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p5084a5af.dip.t-dialin.net
User-Agent KNode/4.7.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6.1364915977.3114.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1364915977 news.xs4all.nl 6911 [2001:888:2000:d::a6]:48779
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:42576

Show key headers only | View raw


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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Help: pickle module unable to load "rb" mode files in linux Peter Otten <__peter__@web.de> - 2013-04-02 17:20 +0200

csiph-web