Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#4730 closed defect (duplicate)

MySQL error when using Stratistics plugin for first time

Reported by: anonymous Owned by: dagomez
Priority: highest Component: StractisticsPlugin
Severity: blocker Keywords: MySQL Error
Cc: Trac Release: 0.11


I have just downloaded and compiled the Stratistics plugin to an egg file. I have then installed it, given myself STRATISTICS_VIEW permission and then clicked on the new Stratistics button.

I then get the following error:

Trac detected an internal error:

File "E:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\web\", line 423, in _dispatch_request
File "E:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\web\", line 197, in dispatch
  resp = chosen_handler.process_request(req)
File "build\bdist.win32\egg\stractistics\", line 123, in process_requestFile "build\bdist.win32\egg\stractistics\", line 31, in global_reportsFile "build\bdist.win32\egg\stractistics\", line 64, in _repository_activityFile "build\bdist.win32\egg\stractistics\", line 113, in _most_active_repository_authorsFile "build\bdist.win32\egg\stractistics\", line 117, in execute_sql_expressionFile "E:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\db\", line 51, in execute
  return self.cursor.execute(sql)
File "E:\Python25\lib\site-packages\mysql_python-1.2.2-py2.5-win32.egg\MySQLdb\", line 166, in executeFile "E:\Python25\lib\site-packages\mysql_python-1.2.2-py2.5-win32.egg\MySQLdb\", line 35, in defaulterrorhandler

ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n     GROUP BY \n     ORDER BY commits DESC \n     LIMIT 5' at line 3")

My system info is as follows:

Trac:  	        0.11.1
Python: 	2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
setuptools: 	0.6c9
MySQL: 	server: "5.0.67-community-nt", client: "5.0.27", thread-safe: 1
MySQLdb: 	1.2.2
Genshi: 	0.5.1
mod_python: 	3.3.1
jQuery:	        1.2.6

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by anonymous

Further info: If I copy and paste the SQL that it is complaining about into MySQL query browser and execute it, it runs fine. (after substituting %s for an integer - 5 in this case)

    SELECT AS author, COUNT( ) AS commits
     FROM revision r
     WHERE r.time > 5 AND r.time < 5 AND NOT IN (5)
     ORDER BY commits DESC
     LIMIT 5

comment:2 Changed 8 years ago by dupond

Priority: normalhighest
Resolution: duplicate
Severity: normalblocker
Status: newclosed

Already reported in #3088

comment:3 Changed 6 years ago by anonymous

Cc: anonymous added; chris.bennell@… removed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain dagomez.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.