[Image-SIG] PB whith PIL and py2exe

Brice Cassagnabčre brice.cassagnabere@voxmobili.com
Thu, 23 Aug 2001 18:23:00 +0200


C'est un message de format MIME en plusieurs parties.

------=_NextPart_000_0043_01C12C00.A3EEC180
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I am using python 21 and PIL1.1.2

I have got a littel problem with the Image.py file:
    In my script version it works without errors;
    But when I compile my script whith py2exe , I have an error in this =
file (Image.py)

At this momment the script just call the open method to open an *.bmp.

I have got the error :

Traceback (most recent call last):
  File "ui\VoxchatManagerMonitoringNb.pyc", line 146, in EvtMake
  File "ui\VoxchatManagerReportParserUi.pyc", line 57, in __init__
  File "ui\VoxchatManagerMonitoringNb.pyc", line 170, in TraceStat
  File "PIL\Image.pyc", line 960, in open
IOError: cannot identify image file

I tried to debug the the Image.py file to see how it works...
I think tha the problem is in the fonction preinit() wich is called line =
938 : Before it, the ID list and the OPEN dictionnary are empty. In the =
script execution, the fonction preinit() initialize ID (['BMP', ......]  =
and OPEN (I didn't manage to find how...) .When i execute the compiled =
version ( compiled with py2exe) ID ans OPEN are still empty after the =
preinit() fonction >>>> the instruction for i in ID is not executed and =
I obtain : raise IOError, "cannot identify image file"

Do you have a solution (patch) or can you explain me how the preinit() =
function works.*
Thanks

------=_NextPart_000_0043_01C12C00.A3EEC180
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I am using python 21 and =
PIL1.1.2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have got a littel problem with the =
Image.py=20
file:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; In my script version =
it works=20
without errors;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; But when I compile =
my script=20
whith py2exe , I have an error in this file (Image.py)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>At this momment the script just call =
the open=20
method to open an *.bmp.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have got the error :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Traceback (most recent call =
last):<BR>&nbsp; File=20
"ui\VoxchatManagerMonitoringNb.pyc", line 146, in EvtMake<BR>&nbsp; File =

"ui\VoxchatManagerReportParserUi.pyc", line 57, in __init__<BR>&nbsp; =
File=20
"ui\VoxchatManagerMonitoringNb.pyc", line 170, in TraceStat<BR>&nbsp; =
File=20
"PIL\Image.pyc", line 960, in open<BR>IOError: cannot identify image=20
file</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I tried to debug the the Image.py file =
to see how=20
it works...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I think tha the problem is in the =
fonction=20
preinit() wich is called line 938 : Before it, the ID list and the OPEN=20
dictionnary are empty. In the script execution, the fonction preinit()=20
initialize ID (['BMP', ......]&nbsp; and OPEN (I didn't manage to find =
how...)=20
.When i execute the compiled version ( compiled with py2exe) ID ans OPEN =
are=20
still empty after the preinit() fonction &gt;&gt;&gt;&gt; the =
instruction for i=20
in ID is not executed and I obtain : raise IOError, "cannot identify =
image=20
file"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Do you have a solution (patch) or can =
you explain=20
me how the preinit() function works.*</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV></BODY></HTML>

------=_NextPart_000_0043_01C12C00.A3EEC180--