[Zope] Photo browsing products for Zope

Jo Meder jo@meder.de
Wed, 1 Jan 2003 23:46:01 +0100


Am 01.01.2003, 22:57 Uhr
	schrub Ed Leafe <ed@leafe.com>:

> >>   File "PIL/Image.py", line 255, in _getdecoder
> >>     raise IOError("decoder %s not available" % decoder_name)
> >>IOError: decoder jpeg not available
> 
> My question was why, even *after* following the steps to ensure 
> that the jpeglib was correctly installed and verifying that the library 
> is indeed in /usr/local/lib, PIL is still not able to find/use it.

If you go to PIL/Image.py and examine the code directly preceding line
255 you will notice that in line 251 PIL tries to 

	getattr(attr(core,decoder_name + "_decoder"))

and subsequently 

	apply(decoder, (mode,) + args + extra)

So there are obviously two points where this try/except may fail: Either
the decoder isn't available at all or the following apply-clause fails.

If you go back to line 48 of Image.py there's another try/except where
PIL imports _imaging. As the corresponding failure case inevitably
returns an exception with the string "The _imaging C module is not
installed" we can conclude that you actually have some _imaging.so
installed.

You could try to "import _imaging" manually and print
"_imaging.__file__" to find out if the correct _imaging.so is imported.

If you successfully imported _imaging you can "dir(_imaging)" and check
if "jpeg_decoder" is an element of the resulting list.

If you have multiple _imaging.so-Files on your system try experimenting
with sys.path to find out, which _imaging.so is actually imported for
Zope.


	Jo.


-- 
Internetmanufaktur Jo Meder ---------------------- Berlin, Germany
http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33
Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45
10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97
Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt