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:

================================================
[sl...@mydesk test]$ python test.py

(python:22108): Gtk-WARNING **: gtkwidget.c:4252: no accelerator (113,4) 
installed in accel group (0x9201460) for GtkImageMenuItem (0x91c8b08)

(python:22108): Gtk-WARNING **: gtkwidget.c:4252: no accelerator (113,4) 
installed in accel group (0x9201460) for GtkImageMenuItem (0x91c8b08)
Traceback (most recent call last):
  
File 
"/usr/lib/python2.5/site-packages/Dabo-0.9.1-py2.5.egg/dabo/ui/uiwx/dToolBar.py",
 
line 486, in __onWxHit
    self.raiseEvent(dEvents.Hit)
  
File 
"/usr/lib/python2.5/site-packages/Dabo-0.9.1-py2.5.egg/dabo/lib/eventMixin.py", 
line 93, in raiseEvent
    bindingFunction(event)
  
File 
"/usr/lib/python2.5/site-packages/Dabo-0.9.1-py2.5.egg/dabo/lib/datanav/Form.py",
 
line 616, in onNew
    self.pageFrame.newByDataSource(self.getBizobj().DataSource)
  
File 
"/usr/lib/python2.5/site-packages/Dabo-0.9.1-py2.5.egg/dabo/lib/datanav/PageFrame.py",
 
line 59, in newByDataSource
    self.Form.new(ds)
  
File 
"/usr/lib/python2.5/site-packages/Dabo-0.9.1-py2.5.egg/dabo/ui/uiwx/dForm.py", 
line 610, in new
    bizobj.new()
  
File 
"/usr/lib/python2.5/site-packages/Dabo-0.9.1-py2.5.egg/dabo/biz/dBizobj.py", 
line 820, in new
    self._onNew()
  
File 
"/usr/lib/python2.5/site-packages/Dabo-0.9.1-py2.5.egg/dabo/biz/dBizobj.py", 
line 1221, in _onNew
    tmpKey = cursor.genTempAutoPK()
  
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: ''
================================================

I'm using Dabo version 0.9.1, postgres version 8.3.7. It's possible I messed 
up the ownership of directory  /usr/local/pgsql/. I have it set to root.root, 
although /usr/local/pgsql/data is set to postgres.root.

I used the following AppWizard profile:

Profile: hello
DbType: PostgreSQL
Name: test
Host: 127.0.0.1
Database: test
User: slitt
Password: **********
Port: 5432

As far as I know, user slitt has priveleges SELECT  INSERT  UPDATE and DELETE 
on the table, and has ALL priveleges on sequence  people_person_id_seq.


*********
The following is more information about the database:



test=# \l
        List of databases
   Name    |  Owner   | Encoding 
-----------+----------+----------
 postgres  | postgres | UTF8
 template0 | postgres | UTF8
 template1 | postgres | UTF8
 test      | postgres | UTF8
(4 rows)

test=# \dt
         List of relations
 Schema |  Name  | Type  |  Owner   
--------+--------+-------+----------
 public | people | table | postgres
(1 row)

test=# \ds
                  List of relations
 Schema |         Name         |   Type   |  Owner   
--------+----------------------+----------+----------
 public | people_person_id_seq | sequence | postgres
(1 row)

test=# SELECT column_name, data_type FROM information_schema.columns WHERE 
table_name = 'people';
 column_name |     data_type     
-------------+-------------------
 person_id   | integer
 lname       | character varying
 fname       | character varying
 job         | character varying
(4 rows)

test=# select * from people;
 person_id |  lname   | fname  |      job       
-----------+----------+--------+----------------
         1 | Litt     | Steve  | Troubleshooter
         2 | Torvalds | Linus  | Pioneer
         3 | Gates    | Bill   | Monopolist
         4 | Obama    | Barack | President
(4 rows)



As far as I know, user slitt has priveleges SELECT  INSERT  UPDATE and DELETE 
on the table, and has ALL priveleges on

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt

_______________________________________________
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/200905051550.47843.sl...@troubleshooters.com

Reply via email to