Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: CRC-checksum failed in gzip

Reply
Thread Tools

Re: CRC-checksum failed in gzip

 
 
andrea crotti
Guest
Posts: n/a
 
      08-01-2012
2012/8/1 Laszlo Nagy <>:
> 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..
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: CRC-checksum failed in gzip andrea crotti Python 11 08-02-2012 10:59 AM
Re: CRC-checksum failed in gzip Laszlo Nagy Python 0 08-01-2012 01:27 PM
Re: CRC-checksum failed in gzip Laszlo Nagy Python 0 08-01-2012 11:11 AM
Re: CRC-checksum failed in gzip Laszlo Nagy Python 0 08-01-2012 10:47 AM
CRC-checksum failed in gzip andrea crotti Python 0 08-01-2012 10:39 AM



Advertisments