NameError: name 'wx' is not defined

  • Anonymous - 2004-06-16

    I'm trying to get version 0.2.3 to work with wxPython 2.4.2 and Python 2.3.4 on a win2k box.  Everything starts up okay, but when I go to save a file I get the above message (with the below traceback).  Just to confuse the issue I originally had wxPython 2.5.1 installed, but have since uninstalled everything Python related and reinstalled the appropriate combination.  Could there be anything left lurking behind, or what?

    I have tried the above combo on a WP box and all is fine.


    11:38:12: Traceback (most recent call last):                                             
    11:38:12:   File "C:\Python23\Lib\site-packages\wxPython\tools\boa\Models\", line 395, in OnSave
    11:38:12:     SourceController.OnSave(self, event)                                       
    11:38:12:       File "C:\Python23\Lib\site-packages\wxPython\tools\boa\Models\", line 153, in OnSave
    11:38:12:     self.editor.activeModSaveOrSaveAs()                                        
    11:38:12:       File "C:\Python23\Lib\site-packages\wxPython\tools\boa\", line 909, in activeModSaveOrSaveAs
    11:38:12:     modulePage.saveOrSaveAs(forceSaveAs)                                       
    11:38:12:       File "C:\Python23\Lib\site-packages\wxPython\tools\boa\", line 348, in saveOrSaveAs
    11:38:12:     if self.saveAs(oldName) and (oldName != model.filename):                   
    11:38:12:       File "C:\Python23\Lib\site-packages\wxPython\tools\boa\", line 336, in saveAs
    11:38:12:     newFilename, success = self.editor.saveAsDlg(filename)                     
    11:38:12:       File "C:\Python23\Lib\site-packages\wxPython\tools\boa\", line 895, in saveAsDlg
    11:38:12:     wxSAVE | wxOVERWRITE_PROMPT)                                               
    11:38:12:       File "C:\Python23\Lib\site-packages\wxPython\tools\boa\", line 165, in __init__
    11:38:12:     self.loadDims()                                                            
    11:38:12:       File "C:\Python23\Lib\site-packages\wxPython\tools\boa\", line 537, in loadDims
    11:38:12:     {'wxSize': wxSize,                                                         
    11:38:12:       File "<string>", line 0, in ?                                            
    11:38:12:     NameError: name 'wx' is not defined   

    • Anonymous - 2004-06-16

      sorry, that should have read ...

      I have tried the above combo on a winXP box and all is fine.

    • Werner F. Bruhin

      Hi Tim,

      you should use the 0.2.8 version out of CVS, see this message for how to get it from CVS.

      The CVS version has sizer support and obviously all kind of other fixes/changes.

      Are you sure that wxPython 2.5.x is NOT installed?  NameError "wx" not defined has been mentioned many times on here in combination with 2.5.x.

      Hopefully Riaan will soon get around to get 0.3 out and then a version which will work with the 2.5 version of wxPython.

      See you

    • Anonymous - 2004-06-21

      I'm definitely trying to work with wx 2.4.2, but did previously have 2.5.1 installed and went through the same errors as mentioned in other threads.

      I've installed TortoiseCVS and have tried to do a checkout (as per the instructions on the referenced post), but can't get past a password prompt.  Elsewhere on this site is says that no password is required.  Is a password required? What is it?

      Thanks for helping,

      • Werner F. Bruhin

        I am using Tortoise too, with the following connection string.

        For the module you have to enter "boa".

        Hope this helps.

        See you

    • Anonymous - 2004-06-22

      Still no luck, I keep getting 'Access Denied' errors.
      I have also tried this at home (ie no Firewall) unsuccessfully.
      What can I try now?



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks