py2exe breaking wxPython?

A

Alex Hall

Hello all,
I have a compiled version of my project, but the wx functions do not
work. When run from the python source, instead of the compiled .exe
file, wx works as expected. I am including msvcr90.dll in the dist
folder. I looked for answers on Google, but I could not really follow
the tutorials and forums I found. Is there a simple fix for this? BTW,
I am still using py2exe and python2.6. Here is the traceback I get
when using the .exe version of the project and calling a wx operation:

Traceback (most recent call last):
File "sw.pyw", line 217, in <module>
File "dict.pyc", line 73, in showLookupDialog
File "wx\_core.pyc", line 7978, in __init__
File "wx\_core.pyc", line 7552, in _BootstrapApp
File "dict.pyc", line 26, in OnInit
AttributeError: 'NoneType' object has no attribute 'Bind'
Traceback (most recent call last):
File "sw.pyw", line 217, in <module>
File "dict.pyc", line 73, in showLookupDialog
File "wx\_core.pyc", line 7978, in __init__
File "wx\_core.pyc", line 7552, in _BootstrapApp
File "dict.pyc", line 26, in OnInit
AttributeError: 'NoneType' object has no attribute 'Bind'
 
J

John Bokma

Alex Hall said:
Hello all,
I have a compiled version of my project, but the wx functions do not
work. When run from the python source, instead of the compiled .exe
file, wx works as expected. I am including msvcr90.dll in the dist
folder. I looked for answers on Google, but I could not really follow
the tutorials and forums I found. Is there a simple fix for this? BTW,
I am still using py2exe and python2.6. Here is the traceback I get
when using the .exe version of the project and calling a wx operation:

Traceback (most recent call last):
File "sw.pyw", line 217, in <module>
File "dict.pyc", line 73, in showLookupDialog
File "wx\_core.pyc", line 7978, in __init__
File "wx\_core.pyc", line 7552, in _BootstrapApp
File "dict.pyc", line 26, in OnInit
AttributeError: 'NoneType' object has no attribute 'Bind'
Traceback (most recent call last):
File "sw.pyw", line 217, in <module>
File "dict.pyc", line 73, in showLookupDialog
File "wx\_core.pyc", line 7978, in __init__
File "wx\_core.pyc", line 7552, in _BootstrapApp
File "dict.pyc", line 26, in OnInit
AttributeError: 'NoneType' object has no attribute 'Bind'

I use wx with Perl, and use a packager and know that for Perl you have
to include additional dlls to make wx work (there is a module that
nicely handles that for you, which I am use). In short just the ms dll
is not enough as far as I know.
 
N

Nick Ballard

Hello all,
I have a compiled version of my project, but the wx functions do not
work. When run from the python source, instead of the compiled .exe
file, wx works as expected. I am including msvcr90.dll in the dist
folder. I looked for answers on Google, but I could not really follow
the tutorials and forums I found. Is there a simple fix for this? BTW,
I am still using py2exe and python2.6. Here is the traceback I get
when using the .exe version of the project and calling a wx operation:

Traceback (most recent call last):
  File "sw.pyw", line 217, in <module>
  File "dict.pyc", line 73, in showLookupDialog
  File "wx\_core.pyc", line 7978, in __init__
  File "wx\_core.pyc", line 7552, in _BootstrapApp
  File "dict.pyc", line 26, in OnInit
AttributeError: 'NoneType' object has no attribute 'Bind'
Traceback (most recent call last):
  File "sw.pyw", line 217, in <module>
  File "dict.pyc", line 73, in showLookupDialog
  File "wx\_core.pyc", line 7978, in __init__
  File "wx\_core.pyc", line 7552, in _BootstrapApp
  File "dict.pyc", line 26, in OnInit
AttributeError: 'NoneType' object has no attribute 'Bind'

This may or may not have something to do with it:

"For Python 2.6, the DLL you need is called MSVCR90.dll. Py2exe is not
able to automatically include this DLL in your dist directory, so you
must provide it yourself.

To complicate things, there is more than one version of this DLL in
existance, each with the same filename. You need the same version that
the Python interpreter was compiled with, which is version
9.0.21022.8. Through the remainder of these instructions, hover your
mouse over the dll file (or the vcredist_x86.exe installer executable)
to confirm which version you've got."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top