Ticket #7701 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

AttributeError: 'psycopg2._psycopg.cursor' object has no attribute 'rows'

Reported by: olistudent Assigned to: Blackhex
Priority: normal Component: ScreenshotsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Hi. Since r8663 I get an error when clicking on the screenshots button in trac.

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.8dev_r0-py2.6.egg/trac/web/main.py", line 450, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.8dev_r0-py2.6.egg/trac/web/main.py", line 206, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/tracscreenshots/core.py", line 154, in process_request
    template, content_type = self._do_actions(context, actions)
  File "build/bdist.linux-x86_64/egg/tracscreenshots/core.py", line 555, in _do_actions
    context.cursor)
  File "build/bdist.linux-x86_64/egg/tracscreenshots/api.py", line 66, in get_components
    ('name', 'description'))
  File "build/bdist.linux-x86_64/egg/tracscreenshots/api.py", line 53, in _get_items
    for row in context.cursor.rows:
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.8dev_r0-py2.6.egg/trac/db/util.py", line 38, in __getattr__
    return getattr(self.cursor, name)
AttributeError: 'psycopg2._psycopg.cursor' object has no attribute 'rows'

For more information please look at the user report: http://trac.freetz.org/ticket/1039

Thank you.

Attachments

Change History

09/20/10 14:00:27 changed by Blackhex

  • status changed from new to assigned.

Ok, I'll check that, but there is one thing that bugs me: Why is the error in backtrace at api.py:53 and api.py:66 when for revision r8663 it should be at api.py:60 and api:72, respectively?

See http://trac-hacks.org/browser/screenshotsplugin/0.11/tracscreenshots/api.py?rev=8663#L60 .

09/20/10 14:57:35 changed by Blackhex

  • status changed from assigned to closed.
  • resolution set to fixed.

Changeset r8987 fixes that.

09/20/10 15:19:14 changed by olistudent

It works. Thanks again.


Add/Change #7701 (AttributeError: 'psycopg2._psycopg.cursor' object has no attribute 'rows')




Change Properties
Action