[Image-SIG] PIL error with encoder

Dhruv Majumdar dhruv at nettrackers.net
Tue Aug 3 13:35:49 CEST 2010


Im new to Python and have been struggling with this error during tests:

IOError: encoder zip not available

I have python 2.7 with zlib, jpeg and freetype installed on the server. When
building PIL it shows support for all three above. However i notice at
ImageFile._save(im, _idat(fp, chunk), [("zip", (0,0)+im.size, 0, rawmode)])

I get the abovementioned error.

Fredrik suggested checking if the correct version of the _imaging module was
in use.

>>> import _imaging; print _imaging.__file__

suggests it is the correct one.

Here's a dump of the complete error in case it helps;

[root at acroplia-1 audioprocessing]# /usr/local/bin/python wav2png.py
processing file M1F1-Alaw-AFsp.wav:
        0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Traceback (most recent
call last):
  File "wav2png.py", line 45, in <module>
  File "/root/a/freesound/freesound/utils/audioprocessing/processing.py",
line 479, in create_wave_images
  File "/root/a/freesound/freesound/utils/audioprocessing/processing.py",
line 391, in save
  File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 1439, in
    save_handler(self, fp, filename)
  File "/usr/local/lib/python2.7/site-packages/PIL/PngImagePlugin.py", line
572, in _save

    ImageFile._save(im, _idat(fp, chunk), [("zip", (0,0)+im.size, 0,
  File "/usr/local/lib/python2.7/site-packages/PIL/ImageFile.py", line 481,
in _save
    e = Image._getencoder(im.mode, e, a, im.encoderconfig)
  File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 401, in
    raise IOError("encoder %s not available" % encoder_name)

IOError: encoder zip not available

Please could someone help me ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20100803/c940a9f4/attachment-0001.html>

More information about the Image-SIG mailing list