Hello,

I try to run the freshly built executable, but this error shows up:

Traceback (most recent call last):
   File "Main.py", line 7, in <module>
   File "MainWindow.pyo", line 11, in <module>
   File "Widgets\bmiWidget.pyo", line 16, in <module>
   File "pygooglechart.pyo", line 24, in <module>
   File "urllib.pyo", line 26, in <module>
   File "socket.pyo", line 46, in <module>
   File "_socket.pyo", line 12, in <module>
   File "_socket.pyo", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.

Py2exe shows this message, after having generated the executable:

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.

   OLEAUT32.dll - C:\WINDOWS\system32\OLEAUT32.dll
   USER32.dll - C:\WINDOWS\system32\USER32.dll
   IMM32.dll - C:\WINDOWS\system32\IMM32.dll
   SHELL32.dll - C:\WINDOWS\system32\SHELL32.dll
   ole32.dll - C:\WINDOWS\system32\ole32.dll
   WINMM.dll - C:\WINDOWS\system32\WINMM.dll
   WSOCK32.dll - C:\WINDOWS\system32\WSOCK32.dll
   COMDLG32.dll - C:\WINDOWS\system32\COMDLG32.dll
   ADVAPI32.dll - C:\WINDOWS\system32\ADVAPI32.dll
   msvcrt.dll - C:\WINDOWS\system32\msvcrt.dll
   WS2_32.dll - C:\WINDOWS\system32\WS2_32.dll
   WINSPOOL.DRV - C:\WINDOWS\system32\WINSPOOL.DRV
   GDI32.dll - C:\WINDOWS\system32\GDI32.dll
   KERNEL32.dll - C:\WINDOWS\system32\KERNEL32.dll
   MSVCP90.dll - C:\Program Files\MiKTeX 2.7\miktex\bin\MSVCP90.dll

I've manually copied all of these .dll's and the .DRV into the same directory as the executable and used "Dependency Walker" to check if there still were some missing .dll's or so, but there weren't any.

Here is my call to setup():

setup(
               options = {"py2exe": {
                                                  "includes": ['sip', 'PyQt4.QtCore', 'PyQt4.QtGui', 'Widgets.*'],
                                                  "dist_dir": "bin"
                                                }
                               },
               data_files = [("files",["Widgets/scaleWidget.gif"])],
               console=['Main.py']
    )

Here is the way my .py-files are stored on my hdd:

src\    => containing Main.py, which dynamically instantiates dialogs that are given in src\Widgets\
src\Widgets\     => contains 4 files, each of them containing code to be a GUI-dialog, but only one of them using the pygooglechart-module (that is mentioned in the error above)

Am I missing something in my setup.py? I'm guessing pygooglechart is using a .dll that isn't listed by py2exe, but how to find out which one if so?


Kind regards,

Nick