Opened 6 years ago

Closed 6 years ago

Last modified 2 years ago

#6320 closed defect (duplicate)

trac-admin get error message so can't go on

Reported by: rue@… Owned by: coling
Priority: normal Component: WorkLogPlugin
Severity: normal Keywords: ProgrammingError, closed, cursor
Cc: Trac Release: 0.11

Description (last modified by rjollos)

Once I execute the trac-admin command , the error messages shown as below.have you seen that?

Upgrading Database
Creating work_log table
Traceback (most recent call last):
  File "/usr/bin/trac-admin", line 8, in <module>
    load_entry_point('Trac==0.11.6', 'console_scripts', 'trac-admin')()
  File "/usr/lib/python2.6/site-packages/Trac-0.11.6-py2.6.egg/trac/admin/", line 1321, in run
    return admin.onecmd(command)
  File "/usr/lib/python2.6/site-packages/Trac-0.11.6-py2.6.egg/trac/admin/", line 138, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/lib/python2.6/", line 219, in onecmd
    return func(arg)
  File "/usr/lib/python2.6/site-packages/Trac-0.11.6-py2.6.egg/trac/admin/", line 1159, in do_upgrade
  File "/usr/lib/python2.6/site-packages/Trac-0.11.6-py2.6.egg/trac/", line 464, in upgrade
  File "build/bdist.linux-i686/egg/worklog/", line 184, in upgrade_environment
  File "build/bdist.linux-i686/egg/worklog/", line 129, in do_db_upgrade
pysqlite2.dbapi2.ProgrammingError: Cannot operate on a closed cursor.

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by rjollos

  • Description modified (diff)

I've seen users in other threads with similar issues say that moving the database connection code into the try block fixes similar issues, but I'm not sure why that would be the case:

    db = self.env.get_db_cnx()
    cursor = db.cursor()
    cursor.execute('SELECT MAX(version) FROM wiki WHERE name=%s', (user_manual_wiki_title,))

comment:2 Changed 6 years ago by coling

I saw similar issues when doing updates to 0.12 over the weekend. I fixed the issues in 0.12 but will try and find time to have a play with this in 0.11 too and push a fix.

comment:3 Changed 6 years ago by coling

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

So this is actually a duplicate of #6902 (or rather the other way round as this one is newer!), but it's been fixed now so all should be well. Sorry for the delay.

comment:4 Changed 2 years ago by rjollos

  • Keywords ProgrammingError closed cursor added

Add Comment

Modify Ticket

as closed The owner will remain coling.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.