[pypy-issue] [issue887] PIL image access object produces a crash with NotImplementedError

Nam Nguyen tracker at bugs.pypy.org
Thu Sep 29 04:40:50 CEST 2011


New submission from Nam Nguyen <namn at bluemoon.com.vn>:

Python Imaging Library (PIL) recommends using an access object (returned from 
Image.load method) to set/get pixel data. This works fine in CPython. In PyPy, 
however, it produces a crash.

>>>> import Image
>>>> img = Image.new('RGB', (288, 192))
>>>> access = img.load()
>>>> access[(0, 0)] = (255, 255, 255)
RPython traceback:
  File "interpreter_gateway.c", line 1264, in 
BuiltinCodePassThroughArguments1_funcrun_obj
  File "module_cpyext_slotdefs.c", line 5065, in wrap_objobjargproc
Fatal RPython error: NotImplementedError
Aborted

The slower approach (via Image.putpixel) runs fine:

>>>> import Image
>>>> img = Image.new('RGB', (288, 192))
>>>> img.putpixel((0, 0), (255, 255, 255))
>>>> quit()

I understand that PIL is mostly C but maybe this has something to do with PyPy 
too.

----------
messages: 3213
nosy: namn, pypy-issue
priority: wish
status: unread
title: PIL image access object produces a crash with NotImplementedError

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue887>
________________________________________


More information about the pypy-issue mailing list