Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #618 (closed defect: fixed)

Opened 12 years ago

Last modified 10 years ago

Cannot add rows to tables in Postgres db using Catwalk

Reported by: andy@… Owned by: anonymous
Priority: high Milestone: 0.9
Component: SQLObject Version:
Severity: major Keywords:
Cc:

Description

Cannot add rows using "Add xxx" in Catwalk to any tables in my model. Example follows:

23/Feb/2006:22:37:00 HTTP INFO Page handler: <bound method CatWalk.add of <turbogears.toolbox.catwalk.CatWalk instance at 0xb74c4b2c>> Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/CherryPy-2.2.0betadev_r980-py2.4.egg/cherrypy/_cphttptools.py", line 99, in _run

self.main()

File "/usr/lib/python2.4/site-packages/CherryPy-2.2.0betadev_r980-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/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/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/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/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/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/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/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/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/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/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('venue_id_seq')

Change History

comment:1 Changed 12 years ago by anonymous

I get the same thing.

Postgresql 8.1, 
python 2.4
TurboGears 0.9a1
nose 0.8.6
RuleDispatch 0.5a0
setuptools 0.6a10
FormEncode 0.4
cElementTree 1.0.5-20051216
PasteScript 0.4.1
elementtree 1.2.6
simplejson 1.1
SQLObject 0.7.1dev-r1588
CherryPy 2.2.0betadev-r980
TurboKid 0.9.1
PyProtocols 1.0a0
INITools 0.1
PasteDeploy 0.4
Paste 0.5dev-r4745
FormEncode 0.4
kid 0.9a0dev-r265
elementtree 1.2.6

Abreviated Traceback:

 File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/main.py", line 1224, in _create
    self._SO_finishCreate(id)
  File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/main.py", line 1248, in _SO_finishCreate
    id, names, values)
  File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/dbconnection.py", line 759, in queryInsertID
    return self._dbConnection._queryInsertID(
  File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1588-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('artist_id_seq')
Request Headers:
  Content-Length: 31
  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.7.12) Gecko/20051010 Firefox/1.0.7 (Ubuntu package 1.0.7)
  CONNECTION: keep-alive
  PRAGMA: no-cache
  CONTENT-LENGTH: 31
  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

comment:2 Changed 12 years ago by florian

  • Priority changed from normal to high
  • Severity changed from normal to major

Just tried on 0.9a1 freshly installed. Same thing with postgres.

comment:3 Changed 12 years ago by ronald@…

  • Status changed from new to closed
  • Resolution set to fixed

Checked in a workaround in rev909 - tested with Postgres on OSX

Note: See TracTickets for help on using tickets.