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.
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 )
Oliver Skiebe writes:
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) I expect "infile" is a file name, right?
In this case, the reference to resolve relative file names is (usually) different when you call the script from the interpreter or inside an External Method: In the interpreter, it is where you started the interpreter; in Zope, it is where Zope has been started (some people reported that it were the "var" directory). Dieter
participants (3)
-
Dieter Maurer -
Michael Geddert -
Oliver Skiebe