Error after creating exe with Py2exe

2

Py2exe seems to run fine although it does mention that a few modules maybe missing.

I had been using the windows option (in my py2exe script) to remove the console window but realized that the process still remained open even after I closed down the gui window i.e. I could still see the process still in task manager... So I switched to using the console option and found the below error printed there. I believe this error is preventing the the app from closing. Apart from that the app runs fine.

Iv tried creating an exe from a very simple wxPython GUI app but even then I still get this error however I have no problem creating executables from apps that do not include wxPython.

Debug: src/helpers.cpp(140): 'createActCtx' failed with error 0x0000007b (the filename, directory name, or volume label syntax is incorrect.).)

alt text

Python: 2.6.6

wxPython: 2.8.11.0

Windows 7

py2exe: 0.6.9

# -*- coding: utf-8 -*-


from distutils.core import setup
import py2exe
import glob



excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
            'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
            'Tkconstants', 'Tkinter']

dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll', 'tk84.dll',]#'msvcp90.dll']

packages = []#'wx.lib.pubsub']


data_files = [("resources", ['resources/1187958_90214884.jpg'])]
packages = ['wx.lib.pubsub',]
options = {'py2exe': {'compressed': 3,
                          'optimize': 2,
                          'excludes': excludes,
                          'packages': packages,
                          'dll_excludes': dll_excludes,
                          'bundle_files': 1,
                          'dist_dir': 'dist',
                          'xref': False,
                          'skip_archive': False,
                          'ascii': False,
                          'packages': packages,
                        'custom_boot_script': '',
                         }
                }  

#windows=[{'script':'gui.py'}]


for script in ["gui.py"]:
    windows=[{
        'script':[script]
    }]

    setup(options=options, console=[script], zipfile=None, data_files=data_files)                        
python
wxpython
py2exe
asked on Stack Overflow Dec 1, 2010 by volting • edited Dec 1, 2010 by volting

1 Answer

1

I've had very little trouble getting wxPython code to compile to an exe using py2exe. I have a tutorial that you can try here:

http://www.blog.pythonlibrary.org/2010/07/31/a-py2exe-tutorial-build-a-binary-series/

I have had some issues with the new version of pubsub that is included with 2.8.11.0. You can read the thread here: http://bit.ly/emoHEr

I ended up reverting to the previous version of wx that day mainly because I didn't have time to figure out what I was doing wrong. I don't know if that's the problem that you're having though.

answered on Stack Overflow Dec 1, 2010 by Mike Driscoll

User contributions licensed under CC BY-SA 3.0