Thread: [Boa Constr] NameError: name 'wx' is not defined - only when trying to save e.g. a new wxFrame modu
Status: Beta
Brought to you by:
riaan
From: Werner F. B. <wer...@fr...> - 2005-01-26 13:23:24
|
I am on Boa 0.3.1 and wxPython 2.4.2.4 on Python 2.3.2 Have not done new work for a while and just discovered this today when I tried to create a new wxPanel. Below is the detailed traceback I get when trying to save (just before getting the save as dialog). FYI, I had at some point 0.4 with wxPython 2.5.x under Python 2.3, however I de installed and installed wxPython 2.4 (and just to be sure I just did it again). Any help/hint would be appreciated. Best regards Werner 20:08:27: Traceback (most recent call last): 20:08:27: File "C:\Python23\Lib\site-packages\wxPython\tools\boa\Models\PythonControllers.py", line 412, in OnSave 20:08:27: SourceController.OnSave(self, event) 20:08:27: File "C:\Python23\Lib\site-packages\wxPython\tools\boa\Models\Controllers.py", line 162, in OnSave 20:08:27: self.editor.activeModSaveOrSaveAs() 20:08:27: File "C:\Python23\Lib\site-packages\wxPython\tools\boa\Editor.py", line 960, in activeModSaveOrSaveAs 20:08:27: modulePage.saveOrSaveAs(forceSaveAs) 20:08:27: File "C:\Python23\Lib\site-packages\wxPython\tools\boa\EditorUtils.py", line 385, in saveOrSaveAs 20:08:27: if self.saveAs(oldName) and (oldName != model.filename): 20:08:27: File "C:\Python23\Lib\site-packages\wxPython\tools\boa\EditorUtils.py", line 373, in saveAs 20:08:27: newFilename, success = self.editor.saveAsDlg(filename) 20:08:27: File "C:\Python23\Lib\site-packages\wxPython\tools\boa\Editor.py", line 946, in saveAsDlg 20:08:27: wxSAVE | wxOVERWRITE_PROMPT) 20:08:27: File "C:\Python23\Lib\site-packages\wxPython\tools\boa\FileDlg.py", line 188, in __init__ 20:08:27: self.loadDims() 20:08:27: File "C:\Python23\Lib\site-packages\wxPython\tools\boa\Utils.py", line 554, in loadDims 20:08:27: {'wxSize': wxSize, 'wxPoint': wxPoint, 20:08:27: File "<string>", line 0, in ? 20:08:27: NameError: name 'wx' is not defined |
From: Riaan B. <riaan@e.co.za> - 2005-01-27 13:27:04
|
Hi Werner, Werner F. Bruhin wrote: > I am on Boa 0.3.1 and wxPython 2.4.2.4 on Python 2.3.2 > > Have not done new work for a while and just discovered this today when I > tried to create a new wxPanel. > > Below is the detailed traceback I get when trying to save (just before > getting the save as dialog). > > FYI, I had at some point 0.4 with wxPython 2.5.x under Python 2.3, > however I de installed and installed wxPython 2.4 (and just to be sure I > just did it again). > > Any help/hint would be appreciated. This is the problem I mentioned with running both 0.3.1 and 0.4.0 with the same resource config directory. In short, 0.4.0 stores a 'wx.Size' in your config file which makes 0.3.1 choke on it. The solution is to run either of the Boas with the -O parameter to specify an alternative config dir name. See my previous mail for more detail and an example. I'll also look into a fix that stores a tuple instead of a Size object, but I suspect that would require changes to 0.3.1 which would defeat the purpose. The issue will become *much* more apparent when all Preferences are stored in 2.5 format, but I'm postponing this while we still have the renamers inplace. I really don't want to rename the resource config dir from .boa-constructor to something else but I see no other solution at the moment :( Cheers, Riaan. |
From: Werner F. B. <wer...@fr...> - 2005-01-27 13:41:31
|
Hi Riaan, Riaan Booysen wrote: > Hi Werner, > > Werner F. Bruhin wrote: > >> I am on Boa 0.3.1 and wxPython 2.4.2.4 on Python 2.3.2 >> >> Have not done new work for a while and just discovered this today when I >> tried to create a new wxPanel. >> >> Below is the detailed traceback I get when trying to save (just before >> getting the save as dialog). >> >> FYI, I had at some point 0.4 with wxPython 2.5.x under Python 2.3, >> however I de installed and installed wxPython 2.4 (and just to be sure I >> just did it again). >> >> Any help/hint would be appreciated. > > > This is the problem I mentioned with running both 0.3.1 and 0.4.0 > with the same resource config directory. > > In short, 0.4.0 stores a 'wx.Size' in your config file which makes > 0.3.1 choke on it. The solution is to run either of the Boas > with the -O parameter to specify an alternative config dir name. > See my previous mail for more detail and an example. > I did that for 0.4, but I guess my 0.3 settings are screwed. So, just changed my 0.3 to use the -O switch too and all works find. > I'll also look into a fix that stores a tuple instead of a Size > object, but I suspect that would require changes to 0.3.1 > which would defeat the purpose. > > The issue will become *much* more apparent when all Preferences are > stored in 2.5 format, but I'm postponing this while we still have the > renamers inplace. > > I really don't want to rename the resource config dir from > .boa-constructor to something else but I see no other solution > at the moment :( Maybe this just needs to go into the documentation, as it only affects people who want to run both versions at the same time. Correct? > > Cheers, > Riaan. > > > See you Werner |
From: Riaan B. <riaan@e.co.za> - 2005-01-27 14:20:13
|
Hi Werner, Werner F. Bruhin wrote: > Hi Riaan, > > Riaan Booysen wrote: > >> Hi Werner, >> >> Werner F. Bruhin wrote: >> >>> I am on Boa 0.3.1 and wxPython 2.4.2.4 on Python 2.3.2 >>> >>> Have not done new work for a while and just discovered this today when I >>> tried to create a new wxPanel. >>> >>> Below is the detailed traceback I get when trying to save (just before >>> getting the save as dialog). >>> >>> FYI, I had at some point 0.4 with wxPython 2.5.x under Python 2.3, >>> however I de installed and installed wxPython 2.4 (and just to be sure I >>> just did it again). >>> >>> Any help/hint would be appreciated. >> >> >> >> This is the problem I mentioned with running both 0.3.1 and 0.4.0 >> with the same resource config directory. >> >> In short, 0.4.0 stores a 'wx.Size' in your config file which makes >> 0.3.1 choke on it. The solution is to run either of the Boas >> with the -O parameter to specify an alternative config dir name. >> See my previous mail for more detail and an example. >> > I did that for 0.4, but I guess my 0.3 settings are screwed. So, just > changed my 0.3 to use the -O switch too and all works find. After 0.4.0 'infected' your 0.3.1 config it was too late to use the option ;) >> I'll also look into a fix that stores a tuple instead of a Size >> object, but I suspect that would require changes to 0.3.1 >> which would defeat the purpose. >> >> The issue will become *much* more apparent when all Preferences are >> stored in 2.5 format, but I'm postponing this while we still have the >> renamers inplace. >> >> I really don't want to rename the resource config dir from >> .boa-constructor to something else but I see no other solution >> at the moment :( > > > Maybe this just needs to go into the documentation, as it only affects > people who want to run both versions at the same time. Correct? Yes. The help files certainly need some sort of 2.4->2.5 migration guide. But having it "just work" is still best and causes much less email and pain for users and myself ;) Cheers, Riaan. |