Modify

Opened 6 years ago

Last modified 8 months ago

#3207 assigned defect

Bug in SQL of Postgres BackendDB

Reported by: valtoni.boaventura@… Owned by: rjollos
Priority: highest Component: StractisticsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description (last modified by rjollos)

Occurs when i call the plugin (i don't see any page yet):

Traceback (most recent call last):

  File "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/stractistics/web_ui.py", line 116, in process_request
    db)
  File "build/bdist.linux-i686/egg/stractistics/global_reports.py", line 31, in global_reports
    weeks_back, db)
  File "build/bdist.linux-i686/egg/stractistics/global_reports.py", line 66, in _repository_activity
    revisions = _retrieve_revisions(authors, start_date, end_date, db)
  File "build/bdist.linux-i686/egg/stractistics/global_reports.py", line 140, in _retrieve_revisions
    revisions = execute_sql_expression(db, sql_expr, map_rows)
  File "build/bdist.linux-i686/egg/stractistics/util.py", line 117, in execute_sql_expression
    cursor.execute(sql_expr)
  File "/usr/local/lib/python2.5/site-packages/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/local/lib/python2.5/site-packages/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/local/lib/python2.5/site-packages/pyPgSQL/PgSQL.py", line 3111, in execute
    raise OperationalError, msg
OperationalError: ERROR:  syntax error at or near ")"
LINE 4: ...e > 1206528374 AND r.time < 1213785974 AND r.author IN (  ) 

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by piglesias@…

When I switched to PostgreSQL backend, from SQLite, when I click de plugin tab, I Get this error:

Traceback (most recent call last):
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/api.py", line 339, in send_error
    'text/html')
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 702, in render_template
    if not req.session or not int(req.session.get('accesskeys', 0)):
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/api.py", line 169, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 257, in _get_session
    return Session(self.env, req)
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/session.py", line 150, in __init__
    self.get_session(req.authname, authenticated=True)
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/session.py", line 164, in get_session
    super(Session, self).get_session(sid, authenticated)
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/session.py", line 56, in get_session
    (sid, int(authenticated)))
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/local/trac-0.11.1/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
InternalError: current transaction is aborted, commands ignored until end of transaction block

Before de migration of de databases, de date format was mm/dd/yy, and then it became dd/mm/yy.

I think that is the cause of the issue.

Best regards

comment:2 Changed 6 years ago by anonymous

This error occurs because ignored_repository_authors and ignored_wiki_authors list are empty. You can fix this error putting the next entries in trac.ini:

[stractistics]
ignored_repository_authors = dummy
ignored_wiki_authors = dummy

comment:3 Changed 4 years ago by rjollos

  • Description modified (diff)

comment:4 Changed 4 years ago by rjollos

  • Owner changed from dagomez to rjollos

comment:5 Changed 8 months ago by rjollos

  • Status changed from new to assigned

Add Comment

Modify Ticket

Action
as assigned .
Author


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

 
Note: See TracTickets for help on using tickets.