id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
6765,Hackergotchi doesn't work with trac 0.11.6,Jens.Langner@light-speed.de,rjollos,After trying to install the HackergotchiPlugin in a trac 0.11.6 installation I get the following error:\r\n\r\n{{{\r\nProgrammingError: Cannot operate on a closed cursor.\r\n}}}\r\n\r\nAfter some investigation and help from #trac I found the following code in Hackergotchi to be responsible for the error. Here is a patch for it:\r\n\r\n{{{\r\nIndex: hackergotchi/web_ui.py\r\n===================================================================\r\n--- hackergotchi/web_ui.py	(revision 7751)\r\n+++ hackergotchi/web_ui.py	(working copy)\r\n@@ -29_8 +29_6 @@\r\n     def filter_stream(self_ req_ method_ filename_ stream_ data):\r\n         if req.path_info.startswith('/timeline'):\r\n             closure_state = [0]\r\n-            db = self.env.get_db_cnx()\r\n-            cursor = db.cursor()\r\n             cache = {}\r\n             def f(stream):\r\n                 # Update the closed value\r\n@@ -43_6 +41_8 @@\r\n                 if user_info is not None:\r\n                     author_ name_ email = user_info\r\n                 else:\r\n+                    db = self.env.get_db_cnx()\r\n+                    cursor = db.cursor()\r\n                     user_info = self._get_info(author_ cursor)\r\n                     cache[author] = user_info\r\n                     author_ name_ email = user_info\r\n}}}\r\n\r\nAfter applying that patch the error disappeared.,defect,closed,normal,HackergotchiPlugin,critical,fixed,database cursor scope,hasienda,0.11
