Changes between Initial Version and Version 1 of Ticket #6320


Ignore:
Timestamp:
Nov 24, 2010, 2:20:59 AM (13 years ago)
Author:
Ryan J Ollos
Comment:

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:

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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6320 – Description

    initial v1  
    11Once I execute the trac-admin command , the error messages shown as below.have you seen that?
    22
     3{{{
    34Upgrading Database
    45Creating work_log table
     
    1920  File "build/bdist.linux-i686/egg/worklog/api.py", line 129, in do_db_upgrade
    2021pysqlite2.dbapi2.ProgrammingError: Cannot operate on a closed cursor.
     22}}}