[issue18323] 'GzipFile' object has no attribute 'extrastart'

R. David Murray report at bugs.python.org
Fri Jun 28 17:30:02 CEST 2013


R. David Murray added the comment:

Based on a quick glance at the code, the problem isn't that you are passing fileobj, it is that fileobj has been opened for writing, not reading, and you are attempting to read from it.  extrastart (and other attibutes) are only set if mode starts with 'r'.

There is certainly a bug here, but it might just be that a clearer error should be generated if you try to read a fileobj open for writing.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18323>
_______________________________________


More information about the Python-bugs-list mailing list