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


Groups > comp.lang.python > #26346

Re: CRC-checksum failed in gzip

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <gandalf@shopzeus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'elif': 0.04; 'binary': 0.05; 'filename': 0.07; 'newline': 0.07; 'binary.': 0.16; 'carriage': 0.16; 'kernel.': 0.16; 'subject:failed': 0.16; 'wrote:': 0.17; 'converted': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'mode.': 0.29; 'obscure': 0.29; 'python2.7': 0.29; "we're": 0.30; "skip:' 10": 0.30; 'file': 0.32; 'running': 0.32; 'to:addr:python-list': 0.33; 'open': 0.35; 'there': 0.35; 'really': 0.36; 'characters': 0.36; 'should': 0.36; 'problems': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'skip:o 20': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'subject:-': 0.40; 'received:204': 0.72; 'andrea': 0.84
Date Wed, 01 Aug 2012 12:47:00 +0200
From Laszlo Nagy <gandalf@shopzeus.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0
MIME-Version 1.0
To python-list@python.org
Subject Re: CRC-checksum failed in gzip
References <CAF_E5JahAZ4w3em_aqBbx63pxiTU-nqtRLZWb5_jRQr2yqhRWA@mail.gmail.com>
In-Reply-To <CAF_E5JahAZ4w3em_aqBbx63pxiTU-nqtRLZWb5_jRQr2yqhRWA@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.2817.1343818024.4697.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1343818024 news.xs4all.nl 6987 [2001:888:2000:d::a6]:42318
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:26346

Show key headers only | View raw


On 2012-08-01 12:39, andrea crotti wrote:
> We're having some really obscure problems with gzip.
> There is a program running with python2.7 on a 2.6.18-128.el5xen (red
> hat I think) kernel.
>
> Now this program does the following:
> if filename == 'out2.txt':
>       out2 = open('out2.txt')
> elif filename == 'out2.txt.gz'
>       out2 = open('out2.txt.gz')
Gzip file is binary. You should open it in binary mode.

out2 = open('out2.txt.gz',"b")

Otherwise carriage return and newline characters will be converted (depending on the platform).

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


Thread

Re: CRC-checksum failed in gzip Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-01 12:47 +0200

csiph-web