On Aug 24, 2007, at 4:15 PM, Mike Driscoll wrote:

>  However, when I open the Dabo
> Application Wizard Demo, it gives me an error when I switch the  
> profile to
> MsSQL (the db server we use here at work).
>
> Traceback (most recent call last):
>   File
> "c:\python24\lib\site-packages\Dabo-0.8.1s-py2.4.egg\dabo\lib 
> \eventMixin.
> py", line 98, in raiseEvent
>     bindingFunction(event)
>   File
> "C:\Python24\Lib\site-packages\Dabo-0.8.1s-py2.4.egg\daboide\wizards 
> \AppW
> izard\AppWizard.py", line 257, in onProfileChoice
>     exec("self.ctl%s.Value = r'%s' " % (fld, val) )
>   File "<string>", line 1, in ?
>   File
> "c:\python24\lib\site-packages\Dabo-0.8.1s-py2.4.egg\dabo\ui\uiwx 
> \dContro
> lItemMixin.py", line 361, in _setValue
>     self.StringValue = value
>   File
> "c:\python24\lib\site-packages\Dabo-0.8.1s-py2.4.egg\dabo\ui\uiwx 
> \dContro
> lItemMixin.py", line 335, in _setStringValue
>     raise ValueError, _("String must be present in the choices.")
> ValueError: String must be present in the choices.

        When you switch profiles, the wizard changes the values of the  
related controls to those of that profile. Think of 'profiles' as a  
set of defaults for each backend. The error you got is what happens  
if you try to set a dDropdownList control (i.e., a wxPython Choice  
control) to a string value that is not one of its choices. So for  
some reason you have a profile that has a bad value in it. My guess,  
since I can't seem to reproduce it here, is that since you said that  
tried Dabo before, you might have an old preferences file saved on  
your disk that has an invalid value in it, causing the error. Try  
deleting this file and see if the problem goes away.

        To find your pref file, open a DOS prompt and type the following:

C:\>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit  
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> import dabo.lib.utils as utils
 >>> utils.getUserAppDataDirectory("Dabo")
u'C:\\Documents and Settings\\Ed Leafe\\Application Data\\Dabo'

        Look in the folder it specifies, and rename the file named  
'DaboPreferences.db' to something else, and then try the wizard  
again. Let me know if the error goes away, or if it still happens.

        One more thing: the whole 'profiles' thing is not necessary and,  
IMO, a bit confusing. You can ignore it completely, and simply select  
'MsSQL' from the 'DbType' list, and go from there.

> Not sure what that means. In an unrelated note, if I run the Dabo  
> Runtime
> Engine, it asks me to give it a python file to open. When I do so, it
> closes the dialog and nothing happens.

        It's hard to tell what the problem is when the program doesn't tell  
you anything!  ;-)

        Try this: open a DOS prompt, and navigate to the folder containing  
daborun.exe. Run it from there, and you should get the Open File  
dialog again. After you close it, if there is an error that is  
crashing the app, you'll get a traceback that you can then copy and  
post here.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to