I too am having the same problem with a different operation.
I am simply iterating through a list of objects returned from a call
to:
countries = Country.select()
the operation looks like:
for obj in v.choiceTable:
print "DEBUG: obj - %s choiceCol - %s" % (obj, v.choiceCol)
choice = getattr(obj, v.choiceCol)
here's the kicker.. it sucessfully iterates through 233 of the 233
items in the list before going south. So there is a 1 off error or
something in an iterator that is either rolling back, committing or
just setting __obsolete to True, and then the process continues for one
more iteration.
here is the trace and the last part of the debug:
DEBUG: obj - <Country 231 name='u"Korea, Democrat..."' abbrev=u'KP'>
choiceCol - name
DEBUG: obj - <Country 232 name=u'French Guiana' abbrev=u'GF'>
choiceCol - name
DEBUG: obj - <Country 233 name=u'Mayotte' abbrev=u'YT'> choiceCol -
name
2006/01/12 16:47:36 INFO Traceback (most recent call last):
File
"d:\python24\lib\site-packages\CherryPy-2.1.0-py2.4.egg\cherrypy\_cphttptools.py",
line 271, in run
main()
File
"d:\python24\lib\site-packages\CherryPy-2.1.0-py2.4.egg\cherrypy\_cphttptools.py",
line 502, in main
body = page_handler(*args, **cherrypy.request.paramMap)
File
"d:\python24\lib\site-packages\TurboGears-0.9a0dev_r466-py2.4.egg\turbogears\controllers.py",
line 240, in newfun
c
html, fragment, *args, **kw)
File
"d:\python24\lib\site-packages\TurboGears-0.9a0dev_r466-py2.4.egg\turbogears\database.py",
line 189, in run_with_
transaction
retval = func(*args, **kw)
File
"d:\python24\lib\site-packages\TurboGears-0.9a0dev_r466-py2.4.egg\turbogears\controllers.py",
line 257, in _execu
te_func
output = func(self, *args, **kw)
File
"d:\python24\lib\site-packages\TurboGears-0.9a0dev_r466-py2.4.egg\turbogears\identity\conditions.py",
line 230, i
n _wrapper
return fn( self, *args, **kwargs )
File
"D:\devstuff\Eltopia_PPG\eltopiawholesale\eltopiawholesale\reseller.py",
line 73, in Configuration
main, msg = genCompanyPage(self.cpnydict)
File
"D:\devstuff\Eltopia_PPG\eltopiawholesale\eltopiawholesale\reseller_content.py",
line 106, in genCompanyPage
html = createDataForm(data, title=name,
nav="/reseller/Configuration",mode="company",op="mod")
File
"D:\devstuff\Eltopia_PPG\eltopiawholesale\eltopiawholesale\htmlutils.py",
line 97, in createDataForm
print "DEBUG: obj - %s choiceCol - %s" % (obj, v.choiceCol)
File
"d:\python24\lib\site-packages\SQLObject-0.7.1dev_r1457-py2.4.egg\sqlobject\main.py",
line 1472, in __repr__
return '<%s %r %s>' \
File
"d:\python24\lib\site-packages\SQLObject-0.7.1dev_r1457-py2.4.egg\sqlobject\main.py",
line 1493, in _reprItems
value = getattr(self, col.name)
File "<string>", line 1, in <lambda>
File
"d:\python24\lib\site-packages\SQLObject-0.7.1dev_r1457-py2.4.egg\sqlobject\main.py",
line 982, in _SO_loadValue
selectResults = self._connection._SO_selectOne(self, dbNames)
File
"d:\python24\lib\site-packages\SQLObject-0.7.1dev_r1457-py2.4.egg\sqlobject\dbconnection.py",
line 795, in __geta
ttr__
self.assertActive()
File
"d:\python24\lib\site-packages\SQLObject-0.7.1dev_r1457-py2.4.egg\sqlobject\dbconnection.py",
line 736, in assert
Active
assert not self._obsolete, "This transaction has already gone
through ROLLBACK; begin another transaction"
AssertionError: This transaction has already gone through ROLLBACK;
begin another transaction
I'll keep looking into this.. i think i have the source of the error
pretty well pinpointed.. just not sure why its failing