py2exe -> error in PYTHON23.DLL

G

Grant Edwards

Using py2exe under WinMe, I bundled up a python program
containing a single line:

print "hello world"

When I zip up the dist directory and move it to another WinMe
machine, trying to run hello.exe either reboots or pops up a
dialog box that says

Hello has caused an error in PYTHON23.DLL
Hello will now close

If you continue to experience problems,
try restarting your computer.

Any ideas on what the problem might be?

It runs find on the machine where I did the bundling and on
another XP machine.

The machine where I bundled up things is using py2exe 0.5.1a1
and running

ActivePython 2.3.2 Build 232 (ActiveState Corp.) based on
Python 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit (Intel)] on win32
 
T

Thomas Heller

Grant Edwards said:
Using py2exe under WinMe, I bundled up a python program
containing a single line:

print "hello world"

When I zip up the dist directory and move it to another WinMe
machine, trying to run hello.exe either reboots or pops up a
dialog box that says

Hello has caused an error in PYTHON23.DLL
Hello will now close

If you continue to experience problems,
try restarting your computer.

Any ideas on what the problem might be?

It runs find on the machine where I did the bundling and on
another XP machine.

The machine where I bundled up things is using py2exe 0.5.1a1
and running

ActivePython 2.3.2 Build 232 (ActiveState Corp.) based on
Python 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit (Intel)] on win32

Most of the time (but not always) the problem is that py2exe copies
system specific dlls to the dist folder. What files do you have there?
Or could it be that the target machine doesn't have msvcrt.dll (which is
needed by the Python dll, but not copied by py2exe).

(Un?)fortunately I have no access to winME...

Thomas
 
G

Grant Edwards

Most of the time (but not always) the problem is that py2exe
copies system specific dlls to the dist folder. What files do
you have there?

$ ls -l
total 1292
-rw-r--r-- 1 grante grante 45056 Jul 2 13:16 hello.exe
-rw-r--r-- 1 grante grante 208795 Jul 2 13:14 library.zip
-rw-r--r-- 1 grante grante 974929 Nov 13 2003 python23.dll
-rw-r--r-- 1 grante grante 57421 Nov 13 2003 _sre.pyd
-rw-r--r-- 1 grante grante 16384 Nov 13 2003 w9xpopen.exe
Or could it be that the target machine doesn't have msvcrt.dll
(which is needed by the Python dll, but not copied by py2exe).

The destination system has two copies of msvcrt.dll in

C:\WINDOWS\SYSTEM
C:\Program files\Aladdin Systems\StuffIt Standard
(Un?)fortunately I have no access to winME...

The failure seems to be intermittent. About 1 of 3 tries it
will run. Other times it fails with failures equally divided
between reboots and error dialogs.

The flakey machine had a fresh install of WinMe done about two
months ago with nothing much besides Cygwin installed since
then. I guess I'll just write it off to standard Windows
flakiness. Why people put up with that sort of behavior in an
OS baffles me.
 
R

RPM1

Grant Edwards said:
Using py2exe under WinMe, I bundled up a python program
containing a single line:

print "hello world"

When I zip up the dist directory and move it to another WinMe
machine, trying to run hello.exe either reboots or pops up a
dialog box that says

Hello has caused an error in PYTHON23.DLL
Hello will now close

If you continue to experience problems,
try restarting your computer.

Any ideas on what the problem might be?

I had a problem with py2exe on WinMe & Win98 because
it needed a unicode extension called unicows. That fixed it.

Patrick
 
D

David Fraser

Thomas said:
Using py2exe under WinMe, I bundled up a python program
containing a single line:

print "hello world"

When I zip up the dist directory and move it to another WinMe
machine, trying to run hello.exe either reboots or pops up a
dialog box that says

Hello has caused an error in PYTHON23.DLL
Hello will now close

If you continue to experience problems,
try restarting your computer.

Any ideas on what the problem might be?

It runs find on the machine where I did the bundling and on
another XP machine.

The machine where I bundled up things is using py2exe 0.5.1a1
and running

ActivePython 2.3.2 Build 232 (ActiveState Corp.) based on
Python 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit (Intel)] on win32


Most of the time (but not always) the problem is that py2exe copies
system specific dlls to the dist folder. What files do you have there?
Or could it be that the target machine doesn't have msvcrt.dll (which is
needed by the Python dll, but not copied by py2exe).

(Un?)fortunately I have no access to winME...

Thomas

Surely py2exe should be able to handle this a bit more gracefully than
crashing / restarting the machine? Maybe a check for the dll would be in
order....

David
 
G

Grant Edwards

I had a problem with py2exe on WinMe & Win98 because
it needed a unicode extension called unicows. That fixed it.

AFAICT, it's py2exe that needs unicows.dll, not the resulting
application package. IOW, you need unicows.dll on the
development machine but not on the target machines.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top