#117 ImportError: MemoryLoadLibrary failed loading win32api.pyd

open
nobody
None
5
2010-04-16
2010-04-16
Anonymous
No

A compiled application with option 'bundle_files' set to 1 or 2 which also uses modules like win32api, win32file; causes an error when running this application for those modules.

Traceback (most recent call last):
File "test.py", line 6, in <module>
import win32api
File "zipextimporter.pyo", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd

The application runs fine if option 'bundle_files' is set to 3. Also, modules like win32clipboard, win32con, win32process are not affected by this bug.

ActivePython 2.6.5.12 (ActiveState Software Inc.) based on
Python 2.6.5 (r265:79063, Mar 20 2010, 14:22:52) [MSC v.1500 32 bit (Intel)] on
win32

py2exe-0.6.9.win32-py2.6.exe

Discussion


  • Anonymous
    2011-05-03

    This is still an issue, prob has been for ages, anyone bothered enough to fix it?

    Secondary bug which might be related to this:
    Traceback (most recent call last):
    File "win32ui.pyo", line 12, in <module>
    File "win32ui.pyo", line 10, in __load
    ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

     

  • Anonymous
    2011-10-19

    According to http://stackoverflow.com/questions/2104611/memoryloaderror-when-trying-to-run-py2exe-application

    look at setup.py, just excludes these dlls which are included in the system.

    'dll_excludes': [ "mswsock.dll", "powrprof.dll" ]