[Zope] zope & PIL

Michael Geddert mgeddert@onlinehome.de
Thu, 19 Sep 2002 21:41:35 +0200


Hi,

I had the same problem.
Fixing this was easy (at least after a while).

1.) use "from PIL import Image" instead of  "Import Image"
2.) put a "PIL.pth" in your Zope-Toplevel-Directory.

Of course, the PIL.pth must point to your PIL Installation under
<PYTHON-HOME>/site-packages...

hth,

Michael


----- Original Message -----
From: "Oliver Skiebe" <oliver.skiebe@alliednetworks.de>
To: <zope@zope.org>
Sent: Thursday, September 19, 2002 8:28 PM
Subject: [Zope] zope & PIL


> hi there,
> we are trying to do some image manipulations with the python imaging
> library;
> i want to use an external method to call different pil functions:
>
> import Image
> def manipulations(infile, outfile,...)
>     manfile = Image.open(infile)
>     ...
>
> called locally from the python interpreter, everything is fine;
> called via zope (independently of doing it via forms or directly)
> it gives me an io error:
>
>
>  Error type:  IOError
>  Error value: cannot identify image file
>
> any suggestions? - thank you!
> - oliver
> --
>
>
> This is Linux Country.  On a quiet night, you can hear Windows reboot.
>
>
>
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )