[Image-SIG] Bug in PIL regaring streaming png files, Patch fixed

Gordon Allott mail at gordallott.com
Wed Jun 3 18:04:14 CEST 2009


It appears there is no place to report bugs regarding PIL or even
contact the developers so it seems that here is the best place to report
this kind of thing. 

There is a bug when you stream png files into PIL.ImageFile.Parser() any
kind of image operation you try and perform on the file will fail with 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 961, in
  File "/usr/lib/python2.6/dist-packages/PIL/ImageFile.py", line 189, in
    s = read(self.decodermaxblock)
  File "/usr/lib/python2.6/dist-packages/PIL/PngImagePlugin.py", line
365, in load_read
    return self.fp.read(bytes)
  File "/usr/lib/python2.6/dist-packages/PIL/ImageFile.py", line 300, in
    data = self.data[pos:pos+bytes]
TypeError: 'NoneType' object is unsubscriptable

More info can be found on the bug report i published to launchpad.net
(without any proper bug reporting mechanism, this was the next best
thing) including a patch to fix the bug for now. 

Gordon Allott <mail at gordallott.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090603/36db54b7/attachment.pgp>

More information about the Image-SIG mailing list