Opened 16 years ago
Closed 14 years ago
#5245 closed defect (fixed)
rollback function not working with sqlite
Reported by: | anonymous | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | VotePlugin |
Severity: | normal | Keywords: | rollback sqlite3 sqlite |
Cc: | jjbig, Thijs Triemstra | Trac Release: | 0.11 |
Description
what I did:
root@mail:~# easy_install http://trac-hacks.org/svn/voteplugin/0.11
<added line "tracvote.* = enabled" to config
root@mail:~# trac-admin <DIR> upgrade Traceback (most recent call last):
File "/usr/bin/trac-admin", line 8, in <module>
load_entry_point('Trac==0.11.4', 'console_scripts', 'trac-admin')()
File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/admin/console.py", line 1317, in run
return admin.onecmd(command)
File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/admin/console.py", line 133, in onecmd
rv = cmd.Cmd.onecmd(self, line) or 0
File "/usr/lib/python2.5/cmd.py", line 219, in onecmd
return func(arg)
File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/admin/console.py", line 1149, in do_upgrade
if not self.env.needs_upgrade():
File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/env.py", line 430, in needs_upgrade
if participant.environment_needs_upgrade(db):
File "build/bdist.linux-i686/egg/tracvote/init.py", line 142, in environment_needs_upgrade File "/usr/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/db/util.py", line 36, in getattr
return getattr(self.cursor, name)
AttributeError: 'PyFormatCursor' object has no attribute 'rollback'
root@mail:~# sqlite3 -version 3.4.2
Trac 0.11.4
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Attachments (0)
Change History (6)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Ok... I guess it should be db.rollback() and not cursor.rollback()
With that modification, it looks ok...
comment:3 Changed 15 years ago by
Cc: | Thijs Triemstra added |
---|
Yep, that fixes it:
-
tracvote/__init__.py
139 139 cursor.fetchone() 140 140 return False 141 141 except: 142 cursor.rollback()142 db.rollback() 143 143 return True 144 144 145 145 def upgrade_environment(self, db):
comment:4 Changed 15 years ago by
This change seems to be missing form the latest commit (6352). This was needed to install with the latest 0.11 release of Trac.
Axton
comment:5 Changed 14 years ago by
Owner: | changed from Alec Thomas to Ryan J Ollos |
---|
Reassigning ticket to new maintainer.
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Latest 0.11 version has cursor.connection.rollback()
. Looks like this issue has been resolved. If you encounter the issue again, please reopen.
Hello,
I get the same error...