Ticket #4730 (closed defect: duplicate)

Opened 4 years ago

Last modified 2 years ago

MySQL error when using Stratistics plugin for first time

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

Description

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\main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "E:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\web\main.py", line 197, in dispatch
  resp = chosen_handler.process_request(req)
File "build\bdist.win32\egg\stractistics\web_ui.py", line 123, in process_requestFile "build\bdist.win32\egg\stractistics\global_reports.py", line 31, in global_reportsFile "build\bdist.win32\egg\stractistics\global_reports.py", line 64, in _repository_activityFile "build\bdist.win32\egg\stractistics\global_reports.py", line 113, in _most_active_repository_authorsFile "build\bdist.win32\egg\stractistics\util.py", line 117, in execute_sql_expressionFile "E:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\db\util.py", 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\cursors.py", line 166, in executeFile "E:\Python25\lib\site-packages\mysql_python-1.2.2-py2.5-win32.egg\MySQLdb\connections.py", 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 r.author \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

Change History

03/02/09 18:27:44 changed 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 r.author AS author, COUNT( r.author ) AS commits
     FROM revision r
     WHERE r.time > 5 AND r.time < 5 AND r.author NOT IN (5)
     GROUP BY r.author
     ORDER BY commits DESC
     LIMIT 5

03/04/09 11:24:46 changed by dupond

  • priority changed from normal to highest.
  • status changed from new to closed.
  • resolution set to duplicate.
  • severity changed from normal to blocker.

Already reported in #3088

07/18/11 17:51:27 changed by anonymous

  • cc deleted.

Add/Change #4730 (MySQL error when using Stratistics plugin for first time)




Change Properties
Action