Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIL Bug with split #53629

Closed
ArrnaudFabre mannequin opened this issue Jul 26, 2010 · 2 comments
Closed

PIL Bug with split #53629

ArrnaudFabre mannequin opened this issue Jul 26, 2010 · 2 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@ArrnaudFabre
Copy link
Mannequin

ArrnaudFabre mannequin commented Jul 26, 2010

BPO 9383
Nosy @ezio-melotti

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2010-07-26.15:10:26.290>
created_at = <Date 2010-07-26.15:08:30.832>
labels = ['type-bug', 'invalid']
title = 'PIL Bug with split'
updated_at = <Date 2010-07-26.15:10:26.288>
user = 'https://bugs.python.org/ArrnaudFabre'

bugs.python.org fields:

activity = <Date 2010-07-26.15:10:26.288>
actor = 'ezio.melotti'
assignee = 'none'
closed = True
closed_date = <Date 2010-07-26.15:10:26.290>
closer = 'ezio.melotti'
components = []
creation = <Date 2010-07-26.15:08:30.832>
creator = 'Arrnaud.Fabre'
dependencies = []
files = []
hgrepos = []
issue_num = 9383
keywords = []
message_count = 2.0
messages = ['111630', '111633']
nosy_count = 2.0
nosy_names = ['ezio.melotti', 'Arrnaud.Fabre']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue9383'
versions = ['Python 2.7']

@ArrnaudFabre
Copy link
Mannequin Author

ArrnaudFabre mannequin commented Jul 26, 2010

>>> 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>)

@ArrnaudFabre ArrnaudFabre mannequin added the type-crash A hard crash of the interpreter, possibly with a core dump label Jul 26, 2010
@ezio-melotti
Copy link
Member

You should report this on the PIL bug tracker. PIL is not part of the Python standard library.

@ezio-melotti ezio-melotti added invalid type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Jul 26, 2010
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant