2

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!

user1110718
  • 217
  • 1
  • 3
  • 11
  • How exactly did you create the exe? If you used the cxfreeze script, what options did you use? If you wrote a distutils setup script, can you post it? It appears that the exe can't import the `ldap` package. What packages does your program depend on? – Velociraptors Dec 28 '11 at 15:11

1 Answers1

3

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

movingcake
  • 46
  • 1