This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Arrnaud.Fabre
Recipients Arrnaud.Fabre
Date 2010-07-26.15:08:30
SpamBayes Score 0.0008839027
Marked as misclassified No
Message-id <1280156912.66.0.913857583224.issue9383@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import Image
>>> im = Image.open('whatever')
>>> im.split()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1497, in split
    if self.im.bands == 1:
AttributeError: 'NoneType' object has no attribute 'bands'

Bug can be fixed by using getdata before split() :

>>> import Image
>>> im = Image.open('whatever')
>>> im.getdata()
<ImagingCore object at 0x7fad913c0090>
>>> im.split()
(<Image.Image image mode=L size=360x480 at 0x1CAE320>, <Image.Image image mode=L size=360x480 at 0x1CAE368>, <Image.Image image mode=L size=360x480 at 0x1CAE3B0>)
History
Date User Action Args
2010-07-26 15:08:32Arrnaud.Fabresetrecipients: + Arrnaud.Fabre
2010-07-26 15:08:32Arrnaud.Fabresetmessageid: <1280156912.66.0.913857583224.issue9383@psf.upfronthosting.co.za>
2010-07-26 15:08:30Arrnaud.Fabrelinkissue9383 messages
2010-07-26 15:08:30Arrnaud.Fabrecreate