py2exe breaking wxPython?

Nick Ballard nrballard at gmail.com
Mon Apr 26 02:53:43 EDT 2010


On Apr 24, 6:53 pm, Alex Hall <mehg... at gmail.com> wrote:
> 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'
>
> --
> Have a great day,
> Alex (msg sent from GMail website)
> mehg... at gmail.com;http://www.facebook.com/mehgcap

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."



More information about the Python-list mailing list