Re: Problem with exe from py2exe



Hello Martin,

> My script runs fine with python, but the .exe produced with py2exe
> crashes out with:
>
> Traceback (most recent call last):
> File "App1.py", line 4, in ?
> File "wx\__init__.pyc", line 42, in ?
> File "wx\_core.pyc", line 3163, in ?
> AttributeError: 'module' object has no attribute
> 'wxEVT_SCROLL_ENDSCROLL'

Noting that you use wxPython 2.6.1.0, are you still using the old
namespace/import commands:

from wxPython.wx import *

?

If this is the case, please switch to the (relatively) new namespace/import
command:

import wx

The new syntax does not have wxEVT_SCROLL_ENDSCROLL but it does have
wx.EVT_SCROLL_ENDSCROLL.

The syntax has changed about 1 year ago (if not more), so if you are still
using the old namespace, I think the wxPython mailing list and the wxPython
main page should report:

"Use the NEW namespace"

In red blinking characters.

If this is not the case, I'm sorry I can't help you a lot. I always use
py2exe but I never encountered such problems.

HTH.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77


.



Relevant Pages

  • py2exe-created exe results in "application failed to initialize"
    ... I'm using wxPython and basically just took the sample for wxpython GUI that came with py2exe and changed the name. ... My setup is python 2.6, ... FileTool = Target( ...
    (comp.lang.python)
  • Re: py2exe
    ... case because i use unsupported modules. ... py2exe can figure those out. ... extra modules and DLLs that py2exe is not able to figure out. ... the wxPython web site talks about this. ...
    (comp.lang.python)
  • Re: Experiences with Py2Exe
    ... I am looking for feedback from people that has used or still uses ... I love to program in python, and I would like to use it to ... Py2Exe would help on that. ... wondering how well behaves Py2Exe with the wxPython module. ...
    (comp.lang.python)
  • wxPython and Py2exe crashes in "window" mode but not in "console" mode
    ... I have created an application using wxPython and compiled it using ... gethostbyaddr and gethostbyname and does a spawnl to another ... around Google and the py2exe and wxPython sites and haven't found ... All are binary distributions for Windows running on Windows XP SP2 ...
    (comp.lang.python)