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


Groups > comp.lang.python > #26347

Re: CRC-checksum failed in gzip

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <andrea.crotti.0@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'elif': 0.04; 'binary': 0.05; 'filename': 0.07; 'newline': 0.07; 'cc:addr:python-list': 0.10; 'binary.': 0.16; 'carriage': 0.16; 'kernel.': 0.16; 'subject:failed': 0.16; 'wrote:': 0.17; 'code,': 0.18; 'converted': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'wrote': 0.26; 'possibly': 0.27; 'message-id:@mail.gmail.com': 0.27; 'mode.': 0.29; 'obscure': 0.29; 'python2.7': 0.29; 'url:mailman': 0.29; "we're": 0.30; "skip:' 10": 0.30; 'url:python': 0.32; 'file': 0.32; 'running': 0.32; 'url:listinfo': 0.32; 'received:google.com': 0.34; 'wrong': 0.34; 'open': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'really': 0.36; 'url:org': 0.36; 'characters': 0.36; 'should': 0.36; 'problems': 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'skip:o 20': 0.38; 'some': 0.38; 'nothing': 0.38; 'subject:-': 0.40; 'header:Received:5': 0.40; 'url:mail': 0.40; 'andrea': 0.84; 'nagy': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FFnm5YFQsKOQ+AWLYDXViu887KIc+9+ASuSgXhFgGBQ=; b=x/YsJUUSGT+8lfQEeKumbounEiWHkwcxibGf+4LeEB8ct75fVZnGewLcLj14VL1lpO hV90k/3X1IUTZHkdfG72CZm2fG2hrXQXHXlXRRiEI6PJGvfxvAG6AhnQGAZrVcXZadcf CET4YQ2n4XaJRawkatEQbJ/osRtr9EPaKIdIkoN121Z2p4rLwxNO0Yg7VmU1fglGMrMo h9Hdo7exZOoqZDuHtlvXzuPnpxAah5IlDKol5+uDsVwwSG7Vq0pbPaVfOXaWzG236rqm LJsw4P//cap9skk6wkrkitbRSz35RmU9LHYg/FlMFEoSZZwPDvUTx7xuMS0xd9shb7/U cLDw==
MIME-Version 1.0
In-Reply-To <50190924.4030605@shopzeus.com>
References <CAF_E5JahAZ4w3em_aqBbx63pxiTU-nqtRLZWb5_jRQr2yqhRWA@mail.gmail.com> <50190924.4030605@shopzeus.com>
Date Wed, 1 Aug 2012 11:58:10 +0100
Subject Re: CRC-checksum failed in gzip
From andrea crotti <andrea.crotti.0@gmail.com>
To Laszlo Nagy <gandalf@shopzeus.com>
Content-Type text/plain; charset=ISO-8859-1
Cc python-list@python.org
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.2818.1343818693.4697.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1343818693 news.xs4all.nl 6961 [2001:888:2000:d::a6]:45140
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:26347

Show key headers only | View raw


2012/8/1 Laszlo Nagy <gandalf@shopzeus.com>:
> 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).
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list


Ah no sorry I just wrote wrong that part of the code, it was
otu2 = gzip.open('out2.txt.gz') because otherwise nothing would possibly work..

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


Thread

Re: CRC-checksum failed in gzip andrea crotti <andrea.crotti.0@gmail.com> - 2012-08-01 11:58 +0100

csiph-web