[Zope] 2.8.5/Win32 image opening error

Dieter Maurer dieter at handshake.de
Tue Jan 24 16:20:49 EST 2006


Mikko Ohtamaa wrote at 2006-1-24 11:04 +0000:
>I installed Zope 2.8.5 for Windows (to use with Plone, moving from 2.7.4). I 
>cannot start Zope in debug mode since I get errors about missing images. At 
>least SiteErrorLog and OFSP complains about missing icons, though files are 
>there. Looks like Zope just can't find them.
>
>IOError: [Errno 2] No such file or directory: 'images/version.gif'

Obviously, the file is refered to by a relative pathname
and the working directory is not adequate for this relative
access.

Filesystem objects should always be referenced with absolute
pathnames.
> ...
>in import_product
>    product=__import__(pname, global_dict, global_dict, silly)
>  File "C:\runtime-workspace\hrm\Zope\lib\python\Products\OFSP\__init__.py", 
>line 43, in ?
>    misc_={
>  File "C:\runtime-workspace\hrm\Python\Lib\site-packages\PIL\ImageFile.py", 
>line 70, in __init__
>    self.fp = open(fp, "rb")
>IOError: [Errno 2] No such file or directory: 'images/version.gif'

This looks like an import order problem.

Zope has itself an "ImageFile" module.
Apparently, mistakenly, the "PIL" "ImageFile" is used instead.
And it behaves very differently.

Obviously, "PIL" is before Zope's software home in your "PYTHONPATH" (aka
"sys.path"). Try to prevent this...


-- 
Dieter


More information about the Zope mailing list