Re: PIL error with encoder

Dhruv Majumdar <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Hi,

Sorry about this , i re-downloaded PIL, and recompiled manually giving
locations for libjpeg and zlib and things worked fine.

Last time i was compiling, i had given the wrong location for zlib .


Thank you,
         Dhruv



On 3 August 2010 17:05, Dhruv Majumdar <[email protected]> wrote:

> Hi,
>
>
> 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__
> /usr/local/lib/python2.7/site-packages/PIL/_imaging.so
>
> suggests it is the correct one.
>
>
> Here's a dump of the complete error in case it helps;
>
> [root@acroplia-1 audioprocessing]# /usr/local/bin/python wav2png.py
> M1F1-Alaw-AFsp.wav
> 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>
>     create_wave_images(*args)
>   File "/root/a/freesound/freesound/utils/audioprocessing/processing.py",
> line 479, in create_wave_images
>     waveform.save(output_filename_w)
>   File "/root/a/freesound/freesound/utils/audioprocessing/processing.py",
> line 391, in save
>     self.image.save(filename)
>   File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 1439, in
> save
>     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,
> rawmode)])
>   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
> _getencoder
>     raise IOError("encoder %s not available" % encoder_name)
>
> IOError: encoder zip not available
>
>
> Please could someone help me ?
>
> Thanks!
>
> Dhruv
>

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.