#4996 closed defect (fixed)
tags plugin fails on upgrading
Reported by: | Jeff Hammel | Owned by: | osimons |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
When I enable the TagsPlugin on a fresh environment, and the upgrade never returns. Specifically, I get a ProgrammerError
as the cursor is not fresh. The following patch fixes:
Index: tractags/model.py =================================================================== --- tractags/model.py (revision 5614) +++ tractags/model.py (working copy) @@ -20,9 +20,9 @@ self._upgrade_db(self.env.get_db_cnx()) def environment_needs_upgrade(self, db): - cursor = db.cursor() if self._need_migration(db): return True + cursor = db.cursor() try: cursor.execute("select count(*) from tags") cursor.fetchone()
Attachments (1)
Change History (8)
Changed 16 years ago by
Attachment: | tagsplugin-model-r5614.diff added |
---|
comment:1 Changed 16 years ago by
Owner: | changed from Alec Thomas to osimons |
---|
comment:2 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [5655]) TagsPlugin: Fixed environment upgrade issue.
Closes #4996.
comment:3 follow-up: 4 Changed 16 years ago by
Thanks for report and patch k0s!
Btw, are you using pysqlite 2.5.5 too? I have a feeling it is directly related to pysqlite that before let this slip through, but now catches the error.
comment:4 Changed 16 years ago by
Replying to osimons:
Thanks for report and patch k0s!
Btw, are you using pysqlite 2.5.5 too? I have a feeling it is directly related to pysqlite that before let this slip through, but now catches the error.
not sure, how do i find out the version number?
comment:5 follow-up: 6 Changed 16 years ago by
See trac:wiki:PySqlite - try this:
python -c "import trac.db.sqlite_backend as s; print s.sqlite.version, s._ver"
It should give you the pysqlite version and the sqlite library version it is compiled against.
comment:6 Changed 16 years ago by
Replying to osimons:
See trac:wiki:PySqlite - try this:
python -c "import trac.db.sqlite_backend as s; print s.sqlite.version, s._ver"It should give you the pysqlite version and the sqlite library version it is compiled against.
Thanks:
1.0.1 (2, 8, 17)
I just noticed the problem when upgrading my pysqlite version (2.3.5 -> 2.5.5) - but on an environment that has been working with tags plugin for a long time.
Your patch makes sense and solves the issue for me too. I'll try to commit it (if I still have permissions).