#560022 pysqlite2.dbapi2.ProgrammingError: Cannot operate on a closed cursor

Package:
trac
Source:
trac
Submitter:
Petr Vorel
Date:
2021-01-11 01:15:07 UTC
Severity:
normal
Tags:
#560022#5
Date:
2009-12-08 12:15:57 UTC
From:
To:
During upgrade from 0.11.5 to 0.11.6 I also run command
trac-admin /home/pevik/etc/trac_xaraya.sipe.cz_sqlite/ resync
which crashed:
Resyncing repository history...
Traceback (most recent call last):
  File "/usr/bin/trac-admin", line 9, in <module>
    load_entry_point('Trac==0.11.6', 'console_scripts', 'trac-admin')()
  File "/usr/lib/python2.5/site-packages/trac/admin/console.py", line 1321, in run
    return admin.onecmd(command)
  File "/usr/lib/python2.5/site-packages/trac/admin/console.py", line 138, 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/admin/console.py", line 681, in do_resync
    cursor.execute("SELECT count(rev) FROM revision")
  File "/usr/lib/python2.5/site-packages/trac/db/util.py", line 65, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 80, in execute
    PyFormatCursor.execute(self, *args)
  File "/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 59, in execute
    args or [])
  File "/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 51, in _rollback_on_error
    return function(self, *args, **kwargs)
pysqlite2.dbapi2.ProgrammingError: Cannot operate on a closed cursor.

Site itself it's working, there are some changes made by trac user, but version is still 0.11.5.
I wonder whether this patch has something to do with it:
* Fix a potential pysqlite cursor problem, thanks, Grzegorz Sobanski.
     See debian/patches/60_roadmap_dbx_cursor_fix.dpatch

#560022#10
Date:
2009-12-10 17:03:55 UTC
From:
To:
Petr, thanks for your bug report!

Could you please add a complete list of installed Trac plugins,
including their versions, to this report?

(Is there a trac-admin command to get the list? I'm only aware
of https://yourtrac/admin/general/plugin .)

IMHO, the patch does not lead to the error. To the contrary, the
error is probably in a code segment that would need a similar
patch, maybe in an installed plugin.

See
http://groups.google.com/group/trac-dev/browse_thread/thread/b6b46dcefe706a84
for a discussion of the issue.

#560022#15
Date:
2009-12-11 14:44:25 UTC
From:
To:
Hello Martin,
I just have installed these packages. No change in my plugins.

Few days ago when I reported this bug I tried resync command several
times and the error occurred every time.

Now the command went successfully. I have no idea what has changed since
last time.

ii  trac                            0.11.6-1          Enhanced wiki and issue tracking system for soft
ii  trac-spamfilter                 0.2.1+svn6871-3   Spam-prevention plugin for Trac
According to people on #trac irc channel there is no trac-admin command to get the list.

#560022#20
Date:
2009-12-16 18:32:21 UTC
From:
To:
tags 560022 unreproducible help
thanks

Help needed: I can't reproduce the bug. It would be nice, if
people who encounter the same problem could please add that here.

#560022#27
Date:
2020-01-09 06:08:43 UTC
From:
To:
Dear submitter,

as the package trac has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/948052

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)