<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16735" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Garamond color=#000080><FONT color=#000000>Hi
Alan</FONT></FONT></DIV>
<DIV><FONT face=Garamond></FONT> </DIV>
<DIV><FONT face=Garamond>A bunch of gzipped files are read with the majority
working but a few don't. I don't know if these files were originally
zipped with gzip but I'd guess that they were.</FONT></DIV>
<DIV><FONT face=Garamond></FONT> </DIV>
<DIV><FONT face=Garamond>Strangely, for the files that don't work I
can read/print the file almost to the end and then it falls over with the
CRC error.</FONT></DIV>
<DIV><FONT face=Garamond></FONT> </DIV>
<DIV><FONT face=Garamond>Dinesh</FONT></DIV>
<DIV><FONT face=Garamond color=#000080><FONT
color=#000000></FONT></FONT> </DIV>
<DIV><FONT face=Garamond color=#000080><FONT color=#000000><FONT
color=#000080></FONT> </DIV>
<DIV>
<HR>
</DIV>
<DIV>Message: 5<BR>Date: Mon, 1 Dec 2008 00:57:04 -0000<BR>From: "Alan Gauld"
<</FONT><A
title="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:alan.gauld@btinternet.com CTRL + Click to follow link"
href="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</A><FONT
color=#000000>><BR>Subject: Re: [Tutor] Reading gzip files<BR>To: </FONT><A
title="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:tutor@python.org CTRL + Click to follow link"
href="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:tutor@python.org">tutor@python.org</A><BR><FONT
color=#000000>Message-ID: <</FONT><A
title="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:ggvcov$eio$1@ger.gmane.org CTRL + Click to follow link"
href="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:ggvcov$eio$1@ger.gmane.org">ggvcov$eio$1@ger.gmane.org</A><FONT
color=#000000>><BR>Content-Type: text/plain; format=flowed;
charset="iso-8859-1";<BR>reply-type=original<BR><BR><BR>"Dinesh B Vadhia"
<</FONT><A
title="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:dineshbvadhia@hotmail.com CTRL + Click to follow link"
href="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:dineshbvadhia@hotmail.com">dineshbvadhia@hotmail.com</A><FONT
color=#000000>> wrote<BR><BR>> I'm reading gzip files and writing the
content out to a text file <BR>> line by line.<BR>> File
"C:\Python25\lib\gzip.py", line 275, in _read<BR>>
self._read_eof()<BR>> File "C:\Python25\lib\gzip.py", line 311, in
_read_eof<BR>> raise IOError, "CRC check failed"<BR>>
IOError: CRC check failed<BR>><BR>> I've checked the Python docs and
online but cannot find a<BR>> solution to the problem.
Thanks.<BR><BR>At great risk of stating the obvious but have you actually
checked<BR>that the CRC of the gzipped file is correct? Does the problem
only<BR>happen with this file or with all gzipped files?<BR><BR>And are the
files actually zipped by gzip or by some other<BR>"compatible" program? If other
does it work for genuine<BR>gzipped files?<BR><BR>Just some ideas to play
with.<BR><BR>Alan G </FONT><BR></DIV></FONT></BODY></HTML>