Newbie question

View: New views
7 Messages — Rating Filter:   Alert me  

Newbie question

by Don Dwiggins-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm just getting started with Dabo, after following it "from a distance"
for quite a while.  I now have a couple of applications for which it
seems to be a natural.  So, I've just downloaded and installed it (Win
XP Pro, Python 2.4, wx 2.8.8.1), and run into a couple of things:

DaboDemo runs fine (as far as I've exercised it), with one little
wrinkle: in the dBitmapButton demo, only the first line of the caption
is displayed, ending in "but when".  Also, the mouse hovering has no
effect -- to get the Ace of Hearts, I have to click on the card.

Next, I tried the AppWizard, and got the following output:

> Dabo Info Log: Tue Sep 23 16:52:09 2008: 0 database connection definition(s) loaded.
> Dabo Info Log: Tue Sep 23 16:52:09 2008: User interface already set to 'wx', so dApp didn't touch it.
> Dabo Info Log: Tue Sep 23 16:52:09 2008: wxPython Version: 2.8.8.1 wxMSW (unicode)
> Traceback (most recent call last):
>   File "AppWizard.py", line 1177, in ?
>     wiz = AppWizard(None, defaultDirectory=defdir)
>   File "AppWizard.py", line 583, in __init__
>     self.append(pgs)
>   File "c:\programfiles\python24\lib\site-packages\Dabo-0.8.4-py2.4.egg\dabo\ui\dialogs\Wizard.py", line 176, in append
>     ret.append(self.append(p))
>   File "c:\programfiles\python24\lib\site-packages\Dabo-0.8.4-py2.4.egg\dabo\ui\dialogs\Wizard.py", line 178, in append
>     ret = self.insert(len(self._pages), pg)
>   File "c:\programfiles\python24\lib\site-packages\Dabo-0.8.4-py2.4.egg\dabo\ui\dialogs\Wizard.py", line 204, in insert
>     page = pg(self.pagePanel)
>   File "AppWizard.py", line 328, in __init__
>     super(PageTableSelection, self).__init__(parent=parent, Caption=Caption)
>   File "c:\programfiles\python24\lib\site-packages\Dabo-0.8.4-py2.4.egg\dabo\ui\dialogs\WizardPage.py", line 24, in __init__
>     self.setup()
>   File "c:\programfiles\python24\lib\site-packages\Dabo-0.8.4-py2.4.egg\dabo\ui\dialogs\WizardPage.py", line 38, in setup
>     self._createBody()
>   File "c:\programfiles\python24\lib\site-packages\Dabo-0.8.4-py2.4.egg\dabo\ui\dialogs\WizardPage.py", line 43, in _createBody
>     self.createBody()
>   File "AppWizard.py", line 338, in createBody
>     clb = self.addObject(dabo.ui.dCheckList, Name="clbTableSelection")
> AttributeError: 'module' object has no attribute 'dCheckList'

I did set dabo.pth, as in the wiki InstallationOnWindows directs.

I've probably done something wrong along the way.  Any suggestions
welcome...

--
Don Dwiggins
Advanced Publishing Technology



_______________________________________________
Post Messages to: Dabo-users@...
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/gbbvjl$n1t$1@...

Re: Newbie question

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sep 23, 2008, at 6:54 PM, Don Dwiggins wrote:

> I'm just getting started with Dabo, after following it "from a  
> distance"
> for quite a while.  I now have a couple of applications for which it
> seems to be a natural.  So, I've just downloaded and installed it (Win
> XP Pro, Python 2.4, wx 2.8.8.1), and run into a couple of things:
>
> DaboDemo runs fine (as far as I've exercised it), with one little
> wrinkle: in the dBitmapButton demo, only the first line of the caption
> is displayed, ending in "but when".  Also, the mouse hovering has no
> effect -- to get the Ace of Hearts, I have to click on the card.

        I thought that limitation was only on OS X. Does anyone else running  
XP see that behavior, too? If so, I'll have to update the docs. On OS  
X, it's a wxPython limitation.

> Next, I tried the AppWizard, and got the following output:
>> Dabo Info Log: Tue Sep 23 16:52:09 2008: 0 database connection  
>> definition(s) loaded.
>> Dabo Info Log: Tue Sep 23 16:52:09 2008: User interface already set  
>> to 'wx', so dApp didn't touch it.
>> Dabo Info Log: Tue Sep 23 16:52:09 2008: wxPython Version: 2.8.8.1  
>> wxMSW (unicode)
>> Traceback (most recent call last):
>>  File "AppWizard.py", line 1177, in ?
>>    wiz = AppWizard(None, defaultDirectory=defdir)
>>

[snip]

>>  File "AppWizard.py", line 338, in createBody
>>    clb = self.addObject(dabo.ui.dCheckList, Name="clbTableSelection")
>> AttributeError: 'module' object has no attribute 'dCheckList'
>
> I did set dabo.pth, as in the wiki InstallationOnWindows directs.
>
> I've probably done something wrong along the way.  Any suggestions
> welcome...

        Sounds like a version mis-match. We've changed the name of the  
dCheckListBox to dCheckList recently.

        Can you open up DaboDemo, and then open the Help/About dialog? That  
will give you the Dabo version info, which you can copy and paste in a  
reply.

-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@...
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/46BDF26E-8AE8-43CA-8C99-BAF22636142C@...

Re: Newbie question

by Don Dwiggins-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ed, thanks for the quick reply:
>
> Sounds like a version mis-match. We've changed the name of the  
> dCheckListBox to dCheckList recently.

I did notice that there's a dCheckListBox in
Lib\site-packages\Dabo-0.8.4-py2.4.egg\dabo\ui\uiwx.  For grins, I did a
"from dabo import ui" in PyAlaMode, then did "ui." to see what showed up
in the completion list.  dCheckListBox wasn't there.  Then I tried "from
dabo.ui import uiwx" and did "uiwx.", and it showed up in the list.  No
idea if that's helpful, but FWIW.
>
> Can you open up DaboDemo, and then open the Help/About dialog? That  
> will give you the Dabo version info, which you can copy and paste in a  
> reply.

Platform: Win
Python Version: 2.4.3 on win32
Dabo Version: Version 0.8.4; Revision ~4111
UI Version: 2.8.8.1 on wxMSW

--
Don Dwiggins
Advanced Publishing Technology



_______________________________________________
Post Messages to: Dabo-users@...
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/gbc6oh$6du$1@...

Re: Newbie question

by Nate Lowrie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Sep 23, 2008 at 6:27 PM, Ed Leafe <ed@...> wrote:
> On Sep 23, 2008, at 6:54 PM, Don Dwiggins wrote:
>> DaboDemo runs fine (as far as I've exercised it), with one little
>> wrinkle: in the dBitmapButton demo, only the first line of the caption
>> is displayed, ending in "but when".  Also, the mouse hovering has no
>> effect -- to get the Ace of Hearts, I have to click on the card.
>
>        I thought that limitation was only on OS X. Does anyone else running
> XP see that behavior, too? If so, I'll have to update the docs. On OS
> X, it's a wxPython limitation.

Just ran the demo with the latest svn on XP and I am seeing the proper
behavior.  On hover, the card does change to the ace of hearts.  I
can't reproduce Don's problem.

Nate L.


_______________________________________________
Post Messages to: Dabo-users@...
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/4bef56240809240651o546b011et400a38e589fb98cb@...

Re: Newbie question: problem with MsSQL using AppWizard

by Don Dwiggins-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, I've made some progress.  Rather than installing, I did the
dabo.pth trick, unzipping dabo-0.8.4.zip into a separate folder.  Now I
can run AppWizard, but the hover problem still exists in DaboDemo.  I
plan to ignore that problem for now.

The more serious problem is in getting AppWizard to talk to MsSQL, which
  I need if I'm going to be able to use Dabo.  I set up the database
parameters for my server and database, and when I hit Next, I get the
following traceback (and a dialog asking me to check the parameters):

> Traceback (most recent call last):
>   File "AppWizard.py", line 305, in onLeavePage
>     tables = cursor.getTables()
>   File "C:\Dwig\tmp\dabo\dabo\db\dCursorMixin.py", line 1787, in getTables
>     return self.BackendObject.getTables(self.AuxCursor, includeSystemTables)
>   File "C:\Dwig\tmp\dabo\dabo\db\dbMsSQL.py", line 79, in getTables
>     {'db':dbName} )
>   File "C:\Dwig\tmp\dabo\dabo\db\dCursorMixin.py", line 331, in execute
>     raise dException.DBQueryException(e, sql)
> DBQueryException: internal error: None
> SQL: select table_name from INFORMATION_SCHEMA.TABLES where table_catalog = %(db)s and table_type = 'BASE TABLE' order by table_name

Using the profiler, I see the following statements sent to the server by
pymssql:
exec sp_server_info 18
SET ARITHABORT ON
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_NULL_DFLT_ON ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET ANSI_NULL_DFLT_ON ON
SET CURSOR_CLOSE_ON_COMMIT ON;SET QUOTED_IDENTIFIER ON
use  Kearney__OnlineDev
begin tran

The SQL shown in the traceback doesn't get sent.  I've probed the code
in dCursorMixin and dbMsSQL a bit, but I can't figure out why the
exception occurs.

--
Don Dwiggins
Advanced Publishing Technology



_______________________________________________
Post Messages to: Dabo-users@...
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/gbe5nh$i1e$1@...

Re: Newbie question: problem with MsSQL using AppWizard

by Paul McNett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Don Dwiggins wrote:

> Well, I've made some progress.  Rather than installing, I did the
> dabo.pth trick, unzipping dabo-0.8.4.zip into a separate folder.  Now I
> can run AppWizard, but the hover problem still exists in DaboDemo.  I
> plan to ignore that problem for now.
>
> The more serious problem is in getting AppWizard to talk to MsSQL, which
>   I need if I'm going to be able to use Dabo.  I set up the database
> parameters for my server and database, and when I hit Next, I get the
> following traceback (and a dialog asking me to check the parameters):
>
>> Traceback (most recent call last):
>>   File "AppWizard.py", line 305, in onLeavePage
>>     tables = cursor.getTables()
>>   File "C:\Dwig\tmp\dabo\dabo\db\dCursorMixin.py", line 1787, in getTables
>>     return self.BackendObject.getTables(self.AuxCursor, includeSystemTables)
>>   File "C:\Dwig\tmp\dabo\dabo\db\dbMsSQL.py", line 79, in getTables
>>     {'db':dbName} )
>>   File "C:\Dwig\tmp\dabo\dabo\db\dCursorMixin.py", line 331, in execute
>>     raise dException.DBQueryException(e, sql)
>> DBQueryException: internal error: None
>> SQL: select table_name from INFORMATION_SCHEMA.TABLES where table_catalog = %(db)s and table_type = 'BASE TABLE' order by table_name

If you change dabo/db/dCursorMixin.py line 331 from 'raise
dException..." to simply "raise", and re-run appwizard, does the
traceback offer more information?

Paul


_______________________________________________
Post Messages to: Dabo-users@...
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/48DA9DAB.9090909@...

Re: Newbie question: problem with MsSQL using AppWizard

by Don Dwiggins-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Paul McNett wrote:
>>> DBQueryException: internal error: None
>>> SQL: select table_name from INFORMATION_SCHEMA.TABLES where table_catalog = %(db)s and table_type = 'BASE TABLE' order by table_name
>
> If you change dabo/db/dCursorMixin.py line 331 from 'raise
> dException..." to simply "raise", and re-run appwizard, does the
> traceback offer more information?

Yes; I get the following:

> Traceback (most recent call last):
>   File "AppWizard.py", line 305, in onLeavePage
>     tables = cursor.getTables()
>   File "C:\Dwig\tmp\dabo\dabo\db\dCursorMixin.py", line 1789, in getTables
>     return self.BackendObject.getTables(self.AuxCursor, includeSystemTables)
>   File "C:\Dwig\tmp\dabo\dabo\db\dbMsSQL.py", line 79, in getTables
>     {'db':dbName} )
>   File "C:\Dwig\tmp\dabo\dabo\db\dCursorMixin.py", line 313, in execute
>     res = self.superCursor.execute(self, sql, params)
>   File "c:\ProgramFiles\Python24\lib\site-packages\pymssql.py", line 126, in execute
>     self.executemany(operation, (params,))
>   File "c:\ProgramFiles\Python24\lib\site-packages\pymssql.py", line 152, in executemany
>     raise DatabaseError, "internal error: %s" % self.__source.errmsg()
> DatabaseError: internal error: None

I've probed a bit further, by printing the SQL statement and parameters;
the statement was:
> select table_name from INFORMATION_SCHEMA.TABLES where table_catalog = %(db)s and table_type = 'BASE TABLE' order by table_name

... and the parameters: {'db': u'Kearney__OnlineDev'}

I did a manual substitution, and executed the following in Query Analyzer:
> select table_name from INFORMATION_SCHEMA.TABLES where table_catalog = 'Kearney__OnlineDev' and table_type = 'BASE TABLE' order by table_name

This worked with no problem.  Then, using pymssql in a Python shell, I
was able to execute the manually substituted query successfully as well.
  However, the following got the same internal error you see above:

> crsr.execute("select ....", params={'db': u'Kearney__OnlineDev'})

(Where I've elided the query for presentation.)

After playing around a bit, I got success by removing the "u" in front
of the parameter; it seems that pymssql doesn't like Unicode strings in
the parameters to cursor.execute().

So, for my immediate purpose, I went through dbMsSQL.py, appending
".encode()" to all the parameters in the execute statements.  This done,
I was able to complete AppWizard and get my app generated.

And now for something completely different: I've seen references to the
"web update" feature, but I haven't found a description on how it works
or how it's invoked.  Could you enlighten me?

Thanks,
--
Don Dwiggins
Advanced Publishing Technology



_______________________________________________
Post Messages to: Dabo-users@...
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/gbedkg$din$1@...
LightInTheBox - Buy quality products at wholesale price!