February 9th, 2004, 11:25 AM
running py2exe on a script, no errors thrown and an executable is made.
Executable does not work - it runs but no results occur and no errors are thrown.
February 9th, 2004, 11:56 AM
A few suggestion in no particular order:
1. Try building the app as a console application and run it from an already open command window. See if anything is printed.
2. Sprinkle a few print statements in the main module to confirm its actually running
3. Check the build logs - I use a modified standard script like this
if __name__ == "__main__":
to write a log file.
# Requires py2exe has been installed that matches python version
# Run this program "python release.py py2exe" to create an executable + dlls found in
# see http://starship.python.net/crew/theller/py2exe/ for details.
from distutils.core import setup
f = open(rd+'\\pybuild.log','w')
sys.stdout = f
I then use a batch file:
4. Make sure you don't just pass exceptions
c:\python23\python py2exe setup.py
Let us know how you get on.
not so Grim
February 9th, 2004, 02:01 PM
it appears to be an issue with the image library.
If compiled and executed from DOS I see the following error:
Traceback (most recent call last):
File "<string>", line 164, in ?
File "<string>", line 129, in MakeText
File "Image.pyc", line 1571, in open
IOError: cannot identify image file
Works fine as a py script - fails as an exe
February 9th, 2004, 03:56 PM
In order to make PIL and PY2EXE work together all libraries of PIL need to be imported such as:
also the py2exe line needs to be:
python setup.py py2exe -pPIL