Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

wxPython 2.8.8.1 Boa startup error

Help
2008-07-21
2013-05-01
  • David Stewart
    David Stewart
    2008-07-21

      Hello!

      I'm a long-time Boa Constructor user and am just here to report that something "changed" between wxPython versions 2.8.8.0 and 2.8.8.1.

      The exact same error occurs running Boa for both Windows XP (Python 2.5 .exe installer version) and Kubuntu 8.04 (wxPython Debian binary repository version).  When I get home I can test it under OSX if needed, too.

      The terminal output under Kubuntu is:

    davids@davids-a2k:~/Python/boa-constructor$ python Boa.py
    Starting Boa Constructor v0.6.1
    importing wxPython
    reading user preferences
    Traceback (most recent call last):
      File "Boa.py", line 271, in <module>
        import Preferences, Utils
      File "/home/davids/Python/boa-constructor/Preferences.py", line 174, in <module>
        c = wx.FileConfig(localFilename=file, style= wx.CONFIG_USE_LOCAL_FILE)
      File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_misc.py", line 3313, in __init__
        _misc_.FileConfig_swiginit(self,_misc_.new_FileConfig(*args, **kwargs))
    wx._core.PyNoAppError: The wx.App object must be created first!

      I reverted back to 2.8.8.0 for Windows, and the 2.8.7.1 in the Ubuntu repositories, and everything is running normally.

      The version of Boa that I'm using is from the CVS on March 20th, 2008.

      Hopefully one of you brainy Boa types can figure out what's changed and, possibly, a fix.

      Thanks!

      Dave

     
    • Dave,

      I see the same problem on Windows with 2.8.8.1 and Robin Dunn confirmed that there was a change in wx.FileConfig which is causing this problem.

      Hopefully Riaan or someone else can provide a correction, i.e. I believe that the fix is to change the call to wx.FileConfig in Boa.preferences.py has to a point after the wx.App is created.

      In the mean time I keep using 2.8.8.0 or 2.8.7.x for Boa.

      Werner

       
    • Steven Zalek
      Steven Zalek
      2008-07-30

      Dave & Werner,

      I can confirm this error. My error code is pasted below (WinXP-32bit sp3, Python-2.5.2, wxPython-2.8.8.1, Boa-0.6.1.b):
      ---------------------------------------------------------------------------------
      C:\Python25\Lib\site-packages\boa-constructor>boa.py
      Starting Boa Constructor v0.6.1
      importing wxPython
      reading user preferences
      Traceback (most recent call last):
        File "C:\Python25\Lib\site-packages\boa-constructor\Boa.py", line 271, in <mod
      ule>
          import Preferences, Utils
        File "C:\Python25\Lib\site-packages\boa-constructor\Preferences.py", line 174,
      in <module>
          c = wx.FileConfig(localFilename=file, style= wx.CONFIG_USE_LOCAL_FILE)
        File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py", line 3313
      , in __init__
          _misc_.FileConfig_swiginit(self,_misc_.new_FileConfig(*args, **kwargs))
      wx._core.PyNoAppError: The wx.App object must be created first!
      ---------------------------------------------------------------------------------

      What's really strange is that I was able to get this combination of code to work ONE TIME on this very machine before the errors started - weird. I performed a complete uninstall and clean-up of the python codes, and a reinstallation, to no avail. I'm also running this very same combination of codes (WinXP-32bit sp3, Python-2.5.2, wxPython-2.8.8.1, Boa-0.6.1.b) on another machine (AMD64 vs Intel), and I experience no errors - doubly strange.

      I will attempt to use wxPython-2.8.8.0 in the interim - thanks for the info. If there is anything else I can do to support a correction, let me know.

      Steve

       
      • The code causing a problem is trying to upgrade the config files for a new version of Boa.

        Riaan will fix this when he finds some time but in the meantime just bypass/not execute the wx.FileConfig stuff works for me and allows me to use 2.8.8.1.

        Here is the changed code in boa/preferences.py, for anyone else who would like to use 2.8.8.1:

        # wx.FileConfig files
        for confFile, version in (('stc-styles.rc.cfg', 1),):
            file = os.path.join(rcPath, confFile)
            confVersion = 0
            if os.path.exists(file):
                # don't do the wx.FileConfig version verification/upgrade until Riaan can fix this
                pass
                #c = wx.FileConfig(localFilename=file, style= wx.CONFIG_USE_LOCAL_FILE)
                #confVersion = c.ReadInt('/resourceconfig/version')

                #if confVersion < version:
                #    _backupAndCopyNewestConfig(confFile, file, '.cfg')
            else:
                shutil.copy2(os.path.join(pyPath, 'Config', confFile), file)

        Werner

         
        • Serge GAUTHIER
          Serge GAUTHIER
          2009-02-03

          Hi,
          I use Boa Constructor with Python 2.5 and wxPython 2.8.7 and I am not able to use the wx.EVNT_TEXT_ENTER event on wx.ComboBox. No event appends in debug mode.
          I would like to know when the Enter key is pressed.
          Thanks
          Serge

           
    • Andy
      Andy
      2008-08-04

      Thanks Werner for posting the workaround.  It works good enough for me too.

      Andy