py2exe and PIL prob

Markus von Ehr markus.vonehr at ipm.fhg.de
Fri Nov 29 05:48:57 EST 2002


Hi,

I am opening an image using PIL with:

from Image import *

self.mi = open(filename)

Everything is alright opening the images in two different programs.
After using py2exe I have two cases/errors:
1.

File "Tkinter.pyc", line 1285, in __call__
File "corr.pyc", line 178, in openImage
File "Image.pyc", line 949, in open
File "Image.pyc", line 204, in init
File "ntpath.pyc", line 408, in abspath
File "imputil.pyc", line 98 in _import_hook
File "<string>", line 52, in _import_top_module
File "imputil.pyc", line 207, in _import_top
File "imputil.pyc", line 258, in _import_one
File "<string>", line 161, in get_code
File "Image.pyc", line 927, in open
ValueError: bad mode

2.
Another program:
Exception in TKinter callback
Traceback (most recent call last):
File "Tkinter.pyc", line 1285, in __call__
File "BioChip.pyc", line 260, in Load
File "Image.pyc", line 960, in open
IOError: cannot identify image file

So everything is OK with the unpacked program, but after using py2exe
it doesn't work any more.
What can I do then? I want to create a shipping version.

Any hints?

Markus



More information about the Python-list mailing list