Ok, I've made progress. I added a lot of print's and tracked the error to the uuid module from the standard library.

Actually, using r854 does not solve the underlying problem. The problem is that uuid uses ctypes.find_library and ctypes.CDLL to find and load the C standard library to access some of its functions. With Python 2.6 and later, this is msvcr90.dll.

If you build an executable with pyinstaller r854, the msvcr90.dll will be in a subfolder Microsoft.VC90.CRT and is simply not found by ctypes.find_library. Normally this would throw an exception, but it is catched and then silently ignored inside uuid.

If you build with pyinstaller r855 and later, msvcr90.dll will be next to the executable. There, it will be found by ctypes.find_library, and when it tries to load it using ctypes.CDLL, the R6034 error dialog appears (before it throws the exception, which is silently ignored like I said). The application should run normal after that if it not absolutely requires access to the C library via ctypes (uuid should work regardless as far as I can tell).

All applications that actually require access to the C library via ctypes will probably fail at some point, regardless of the pyinstaller version used to create them.

A solution would be to add the VC90 assembly dependency to the executable's manifest, but this breaks onefile builds if users don't have the VC90 runtimes installed. A workaround for that could be having two executables for onefile builds: One without manifest, which just extracts the embedded archive to the temporary directory, and the other one with manifest, part of the archive, which is then launched by the 'stub' unpacker executable.

Am 19.09.2010 15:56, schrieb Florian Höch:
Ok, it's a start, thanks. I'll see if I can figure something out.

Am 19.09.2010 06:13, schrieb Dan Halbert:
On 9/18/2010 3:23 PM, Raoul Snyman wrote:
I wonder though, if it is not perhaps a particular library or set of
libraries that is helping cause this. My application is written in
PyQt4, so I'm wondering if it's not something like that.

Dan, what other compiled libraries are you using?


After a lot of slashing and burning of my original program, I have
narrowed this down to a test case of a file containing simply

import storm.locals

This is the 0.17 release of the Storm ORM, which I built simply as
"python setup.py install" on Windows. Raoul, are you using Storm?

I re-verified that the head does generate an R6034 and r854 does not.
Giovanni and Florian, is this enough to get you started with a test
case? I have not yet tried to figure out what's going on inside Storm.

Dan



Regards
--
Florian Höch

--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to