Hello, I have lost already 2 days in it and can't figure whats wrong. I'm using PIL to generate barcodes and writen an external method to handle this. The script runs fine in the console but inside Zope it raises exceptions in PIL files. I decided to write an external script and call it with sys.system from the external method but again it raises exceptions similar to the other but in other files. What can it bee? Traceback (most recent call last): File "/engenho/bin/codigo_barra.py", line 89, in ? barra.save(arquivo) File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 1127, in save preinit() File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 243, in preinit __import__("%sImagePlugin" % m, globals(), locals(), []) File "/usr/lib/python2.3/site-packages/PIL/GifImagePlugin.py", line 53, in ? class GifImageFile(ImageFile.ImageFile): AttributeError: 'module' object has no attribute 'ImageFile' I'm using zope 2.7 from Debian sarge. Thanks, -- Luiz Fernando B. Ribeiro Engenho Soluções para a Internet +55 11 6959-7610
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Luiz Fernando B. Ribeiro wrote:
Hello,
I have lost already 2 days in it and can't figure whats wrong. I'm using PIL to generate barcodes and writen an external method to handle this. The script runs fine in the console but inside Zope it raises exceptions in PIL files. I decided to write an external script and call it with sys.system from the external method but again it raises exceptions similar to the other but in other files. What can it bee?
Traceback (most recent call last): File "/engenho/bin/codigo_barra.py", line 89, in ? barra.save(arquivo) File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 1127, in save preinit() File "/usr/lib/python2.3/site-packages/PIL/Image.py", line 243, in preinit __import__("%sImagePlugin" % m, globals(), locals(), []) File "/usr/lib/python2.3/site-packages/PIL/GifImagePlugin.py", line 53, in ? class GifImageFile(ImageFile.ImageFile): AttributeError: 'module' object has no attribute 'ImageFile'
I'm using zope 2.7 from Debian sarge.
This is an ancient name-collision problem between PIL and Zope. E.g., see http://mail.python.org/pipermail/image-sig/1999-August/000809.html or http://aspn.activestate.com/ASPN/Mail/Message/zope-list/2290857. Tres. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCg7LK+gerLs4ltQ4RApBcAJ91EYmzDi4mhvvLAseCwF5HNu5r6wCfXKfX zK6dTXoyciaEYj+lfB+85+8= =wJJz -----END PGP SIGNATURE-----
participants (2)
-
Luiz Fernando B. Ribeiro -
Tres Seaver