cx_Freeze/ldap: ImportError: DLL Load Failed %1 is not a valid Win32 application

折月煮酒 提交于 2020-01-04 06:50:45

问题


I am using cx_Freeze to convert my python program to an exe. It all runs fine when it is a .py however when I come to run the exe, I get the following traceback;

Traceback (most recent call last):
  File "UCA_Starter.py", line 45, in <module>
  File "UCA_Starter.py", line 39, in main
  File "C:\Python26\Scripts\ClientSelector.py", line 20, in <module>
    import login_d
  File "C:\Python26\Scripts\login_d.py", line 6, in <module>
    import ad_auth
  File "C:\Python26\Scripts\ad_auth.py", line 1, in <module>
    import ldap
  File "C:\Python26\lib\site-packages\ldap\__init__.py", line 22, in <module>
    from _ldap import *
  File "ExtensionLoader_ldap__ldap.py", line 12, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.

I have googled the problem but I am still not sure what it even means or if it is a problem with cx_Freeze or the module or if i'm just missing dll's. Any help would be much appreciated. Thanks in advance!


回答1:


Try to install the 32bit version of the cx_Freeze. That worked for me.



来源:https://stackoverflow.com/questions/8597126/cx-freeze-ldap-importerror-dll-load-failed-1-is-not-a-valid-win32-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!