#675: Catwalk fails when adding new row (Postgres)
-----------------------------------+----------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  anonymous
     Type:  defect                 |      Status:  new      
 Priority:  normal                 |   Milestone:           
Component:  Toolbox                |     Version:           
 Severity:  normal                 |    Keywords:           
-----------------------------------+----------------------------------------
 Simplest class I can think of:

 class Conference(SQLObject):
     name = StringCol(length=30)

 When trying to add a record via Catwalk, I get:

 127.0.0.1 - - [21/Mar/2006:20:28:53] "GET
 /catwalk/columns?objectName=Conference HTTP/1.1" 200 189
 21/Mar/2006:20:29:01 HTTP INFO Page handler: <bound method CatWalk.add of
 <turbogears.toolbox.catwalk.CatWalk instance at 0x408f680c>>
 Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.0rc1-
 py2.4.egg/cherrypy/_cphttptools.py", line 99, in _run
     self.main()
   File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.0rc1-
 py2.4.egg/cherrypy/_cphttptools.py", line 248, in main
     body = page_handler(*virtual_path, **self.params)
   File "<string>", line 3, in add
   File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a1-
 py2.4.egg/turbogears/controllers.py", line 210, in expose
     tg_format, html, fragment, *args, **kw)
   File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a1-
 py2.4.egg/turbogears/database.py", line 193, in run_with_transaction
     retval = func(*args, **kw)
   File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a1-
 py2.4.egg/turbogears/controllers.py", line 228, in _execute_func
     output = errorhandling.try_call(func, *args, **kw)
   File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a1-
 py2.4.egg/turbogears/errorhandling.py", line 63, in try_call
     output = func(self, *args, **kw)
   File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a1-
 py2.4.egg/turbogears/toolbox/catwalk/__init__.py", line 789, in add
     new_object = obj(**params)
   File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-
 py2.4.egg/sqlobject/main.py", line 1197, in __init__
     self._create(id, **kw)
   File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-
 py2.4.egg/sqlobject/main.py", line 1224, in _create
     self._SO_finishCreate(id)
   File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-
 py2.4.egg/sqlobject/main.py", line 1248, in _SO_finishCreate
     id, names, values)
   File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-
 py2.4.egg/sqlobject/dbconnection.py", line 752, in queryInsertID
     return self._dbConnection._queryInsertID(
   File "/usr/local/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-
 py2.4.egg/sqlobject/postgres/pgconnection.py", line 122, in _queryInsertID
     c.execute("SELECT NEXTVAL('%s')" % sequenceName)
 ProgrammingError: ERROR:  current transaction is aborted, commands ignored
 until end of transaction block

 SELECT NEXTVAL('conference_id_seq')
 Request Headers:
   Content-Length: 30
   ACCEPT-CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.7
   USER-AGENT: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1)
 Gecko/20060124 Firefox/1.5.0.1
   CONNECTION: keep-alive
   PRAGMA: no-cache
   CONTENT-LENGTH: 30
   HOST: localhost:7654
   CACHE-CONTROL: no-cache
   CONTENT-TYPE: application/x-www-form-urlencoded
   ACCEPT:
 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
   Remote-Addr: 127.0.0.1
   ACCEPT-LANGUAGE: en-us,en;q=0.5
   Content-Type: application/x-www-form-urlencoded
   Remote-Host: 127.0.0.1
   ACCEPT-ENCODING: gzip,deflate
   KEEP-ALIVE: 300
 127.0.0.1 - - [21/Mar/2006:20:29:01] "POST /catwalk/add HTTP/1.1" 500 3121
 2006-03-21 20:29:05,281 turbogears.controllers DEBUG Returning JSON
 127.0.0.1 - - [21/Mar/2006:20:29:05] "GET
 /catwalk/instances?objectName=Conference&start=0 HTTP/1.1" 200 192

 TurboGears 9.0a1
 Postgres 8.0.3

 The table and sequence have been created successfully.

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/675>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to