[Setup] PIL / Python Imaging Library

Bernhard Barkow bbarkow at 24on.cc
Sun Feb 5 10:11:43 UTC 2006


I'm having a serious problem with getting the Python Image Library to 
work with Plone: 
it compiles fine with JPEG support, and passes the selftest.py (55 tests),
but whenever I try to upload a JPEG file through Plone, 
I receive an error in the event.log.
Trying it directly in Python, I tracked it down to what is listed below
(AttributeError: 'module' object has no attribute '_safe_read').

I use Python 2.3.5 and libjpeg62 (Debian 3.1), PIL 1.1.5 (no Freetype2).
Has anyone experienced this before, and does anyone have a hint 
how to get around that?



...# pilfile.py -v logo2.jpg
logo2.jpg failed: unexpected error
Traceback (most recent call last):
  File "/usr/bin/pilfile.py", line 75, in ?
    im = Image.open(file)
  File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 1556, in open
    return factory(fp, filename)
  File "/usr/lib/python2.3/site-packages/PIL/ImageFile.py", line 78, in __init__
  File "/usr/lib/python2.3/site-packages/PIL/JpegImagePlugin.py", line 270, in _open
    handler(self, i)
  File "/usr/lib/python2.3/site-packages/PIL/JpegImagePlugin.py", line 56, in APP
    s = ImageFile._safe_read(self.fp, n)
AttributeError: 'module' object has no attribute '_safe_read'

More information about the Setup mailing list