[Image-SIG] IOError: decoder zip not available

Johnson, Adam adamj at captainweirdbeard.com
Fri Jan 7 21:19:13 CET 2011


Hello!

I am trying to run an image processing script on a new server under CentOS
5.4. I have compiled and installed PIL 1.1.7 to run with Python 2.7.1. The
compile went fine. All libraries (except TKInter) were found. All 57 tests
were passed by the test script.

When I try to run my script, however, I get the following error:

IOError: decoder zip not available

I presume that this either has to do with zlib or libjpeg but, as I said,
these libraries are installed and have been successfully used by other apps
on the server such as php 5.3.3 and ImageMagick.

Can someone help me find out what is not working and how to fix it?

I have confirmed that sys.path is looking in the right directories for the
libraries. I have also confirmed, by enabling verbose mode and importing the
Image module in IDLE.

Everything seems to look right but, still, it cannot find decoder zip. Here
is the output from the script I am using:


The python sys path is:
['/usr/local/mcutil/haven/minecraft-overviewer', '/usr/local/lib/python2.7',
'/usr/local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/encodings',
'/usr/local/mcutil/haven/minecraft-overviewer',
'/usr/local/lib/python27.zip', '/usr/local/lib/python2.7/plat-linux2',
'/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/site-packages/PIL',
'/usr/local/lib/python2.7/site-packages/numpy']
Traceback (most recent call last):
  File "/usr/local/mcutil/haven/minecraft-overviewer/gmap.py", line 40, in
<module>
    import world
  File "/usr/local/mcutil/haven/minecraft-overviewer/world.py", line 28, in
<module>
    import chunk
  File "/usr/local/mcutil/haven/minecraft-overviewer/chunk.py", line 25, in
<module>
    import textures
  File "/usr/local/mcutil/haven/minecraft-overviewer/textures.py", line 116,
in <module>
    terrain_images = _split_terrain(_get_terrain_image())
  File "/usr/local/mcutil/haven/minecraft-overviewer/textures.py", line 110,
in _split_terrain
    Image.BICUBIC)
  File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 1615, in
transform
    im.__transformer((0, 0)+size, self, method, data, resample, fill)
  File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 1658, in
__transformer
    image.load()
  File "/usr/local/lib/python2.7/site-packages/PIL/ImageFile.py", line 189,
in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 385, in
_getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder zip not available


I have re-installed the zlib and zlib-devel packages via yum with no effect.
I have rebuilt PIL several times and received positive results from the
build process but no change in behavior. (Here is a copy of the output of
setup.py:


[root at mc2 Imaging-1.1.7]# python setup.py install
running install
running build
running build_py
running build_ext
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version       1.1.7
platform      linux2 2.7.1 (r271:86832, Dec  9 2010, 10:13:10)
              [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
--- LITTLECMS support available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.
running build_scripts
running install_lib
running install_scripts
changing mode of /usr/local/bin/pildriver.py to 755
changing mode of /usr/local/bin/pilfile.py to 755
changing mode of /usr/local/bin/pilconvert.py to 755
changing mode of /usr/local/bin/pilfont.py to 755
changing mode of /usr/local/bin/pilprint.py to 755
running install_egg_info
Removing /usr/local/lib/python2.7/site-packages/PIL/PIL-1.1.7-py2.7.egg-info
Writing /usr/local/lib/python2.7/site-packages/PIL/PIL-1.1.7-py2.7.egg-info
creating /usr/local/lib/python2.7/site-packages/PIL.pth


I have scoured dozens of threads relating to the same problem. Most of them
yeilded terse, dummy answers like not having the devel packages installed
for the dependencies. This is obviously not the case here.


[root at mc2 Imaging-1.1.7]# yum list installed |grep zlib
zlib.x86_64                               1.2.3-3
installed
zlib-devel.x86_64                         1.2.3-3
installed
[root at mc2 Imaging-1.1.7]# yum list installed |grep jpeg
libjpeg.x86_64                            6b-37
installed
libjpeg-devel.x86_64                      6b-37
installed
[root at mc2 Imaging-1.1.7]# yum list installed |grep png
libpng.x86_64                             2:1.2.10-7.1.el5_5.3
installed
libpng-devel.x86_64                       2:1.2.10-7.1.el5_5.3
installed
[root at mc2 Imaging-1.1.7]# yum list installed |grep tiff
libtiff.x86_64                            3.8.2-7.el5_5.5
installed
libtiff-devel.x86_64                      3.8.2-7.el5_5.5
installed
[root at mc2 Imaging-1.1.7]# yum list installed |grep freetype
freetype.x86_64                           2.2.1-28.el5_5.1
installed
freetype-devel.x86_64                     2.2.1-28.el5_5.1
installed
[root at mc2 Imaging-1.1.7]# yum list installed |grep lcms
lcms.x86_64                               1.18-0.1.beta1.el5_3.2
installed
lcms-devel.x86_64                         1.18-0.1.beta1.el5_3.2
installed


I also tried digging through the archives of this mailing list but I cannot
find a search tool. I went back several weeks, chronologically and did not
find any mention of this error message. My apologies if it is here somewhere
and I did not know how to find it.

Any help with where to look, how to troubleshoot, or even an answer would be
greatly appreciated.

Thanks in advance!
Hitting his head against the wall,
Adam  :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20110107/d7e0fd82/attachment.html>


More information about the Image-SIG mailing list