Modify

Opened 17 years ago

Closed 14 years ago

#2628 closed defect (wontfix)

exception on first click ...

Reported by: anonymous Owned by: dagomez
Priority: normal Component: StractisticsPlugin
Severity: normal Keywords:
Cc: jeremy.benoist@…, apedraz@… Trac Release: 0.10

Description

Traceback (most recent call last):
  File "/opt/csw/lib/python/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/opt/csw/lib/python/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.solaris-2.10-sun4u/egg/stractistics/stractistics.py", line 88, in process_request
    ticket_activity_query_response = self._ticket_activity(req.args)
  File "build/bdist.solaris-2.10-sun4u/egg/stractistics/stractistics.py", line 257, in _ticket_activity
    cursor.execute(sql_statement, [start_date])
  File "/opt/csw/lib/python/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/opt/csw/lib/python/site-packages/trac/db/sqlite_backend.py", line 56, in execute
    args or [])
  File "/opt/csw/lib/python/site-packages/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: near "DISTINCT": syntax error

Attachments (0)

Change History (9)

comment:1 Changed 17 years ago by dagomez

Hi, I'd need more info. What's your python version? Are you using sqlite as your Trac database?

comment:2 in reply to:  1 ; Changed 17 years ago by anonymous

Cc: jeremy.benoist@… added; anonymous removed

Replying to dagomez:

Hi, I'd need more info. What's your python version? Are you using sqlite as your Trac database?

Same error with Trac 0.10.4 and Stractistics 0.2.1

Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/stractistics/stractistics.py", line 93, in process_request
  File "build/bdist.linux-i686/egg/stractistics/stractistics.py", line 267, in _ticket_activity
  File "/var/lib/python-support/python2.4/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 244, in execute
    self.rs = self.con.db.execute(SQL)
DatabaseError: near "DISTINCT": syntax error

comment:3 in reply to:  2 Changed 17 years ago by Narno

Same error with Trac 0.10.4 and Stractistics 0.2.1

Sorry Trac 0.10.3

comment:4 Changed 17 years ago by dagomez

Hi, could you tell me if you are using sqlite?

comment:5 Changed 17 years ago by j0k

Yes we are using SQLite

comment:6 Changed 17 years ago by dagomez

Hi,

Please, run this inside an interpreter and check if the version numbers match.

>>> import trac.db.sqlite_backend as test
>>> test._ver
(3, 1, 3)
>>> test.have_pysqlite
2
>>> test.sqlite.version
'2.3.2'

comment:7 in reply to:  6 ; Changed 17 years ago by anonymous

Cc: apedraz@… added

Replying to dagomez:

Hi,

Please, run this inside an interpreter and check if the version numbers match.

>>> import trac.db.sqlite_backend as test
>>> test._ver
(3, 1, 3)
>>> test.have_pysqlite
2
>>> test.sqlite.version
'2.3.2'

The same problem for me:

#sqlite -version 2.8.17

comment:8 in reply to:  7 Changed 17 years ago by dagomez

Hi, Sqlite 2.8.17 is a pretty old version so I'd suggest upgrading. You can find good advice here: http://trac.edgewall.org/wiki/PySqlite

comment:9 Changed 14 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

0.10 version will no longer be supported. See trunk for a 0.11 version (trunk might have a 0.12 version shortly, in which case a 0.11 branch will be created).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain dagomez.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.