Steve Litt wrote:
> Hi all,
> 
> How do I narrow down this problem? My AppWizard generated program can view 
> the 
> data but gets a traceback when I try to write it.
> 
> I used AppWizard to build a "hello word" from Postgres database test with 
> single table people consisting of an autoincrement called person_id, and text 
> fields fname, lname and job. The generated app was able to view the data, but 
> when I tried to add, it failed with the following trace:

[snip]

> File 
> "/usr/lib/python2.5/site-packages/Dabo-0.9.1-py2.5.egg/dabo/db/dCursorMixin.py",
>  
> line 760, in genTempAutoPK
>     pkVal = rec[kf]
> KeyError: ''

Is there a primary key defined in the postgres table? If so, it appears that 
AppWizard didn't identify it as such when generating the app.

Try going into the generated bizobj and adding to initProperties():
   self.KeyField = "person_id"
   self.AutoPopulatePK = True

Paul


_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4a009c94.3000...@ulmcnett.com

Reply via email to