id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release 3088,Error in MySQL Query Syntax,abidoon@…,,"Trac detected an internal error: {{{ 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"") }}} Most recent call last: {{{#!logtalk * File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py"", line 417, in _dispatch_request Code fragment: 412. try: 413. if not env and env_error: 414. raise HTTPInternalError(env_error) 415. try: 416. dispatcher = RequestDispatcher(env) 417. dispatcher.dispatch(req) 418. except RequestDone: 419. pass 420. resp = req._response or [] 421. 422. except HTTPException, e: Local variables: Name Value after [u' except RequestDone:', u' pass', u' resp = ... before [u' try:', u' if not env and env_error:', u' raise ... dispatcher e <_mysql_exceptions.ProgrammingError instance at 0x2aaad0d82518> env env_error None exc_info (, ... filename '/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py' frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ... has_admin True line u' dispatcher.dispatch(req)' lineno 416 message u'ProgrammingError: (1064, ""You have an error in your SQL syntax; check ... req resp [] tb tb_hide None traceback 'Traceback (most recent call last):\n File ... * File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py"", line 197, in dispatch Code fragment: 192. req.args.get('__FORM_TOKEN') != req.form_token: 193. raise HTTPBadRequest('Missing or invalid form token. ' 194. 'Do you have cookies enabled?') 195. 196. # Process the request and render the template 197. resp = chosen_handler.process_request(req) 198. if resp: 199. if len(resp) == 2: # Clearsilver 200. chrome.populate_hdf(req) 201. template, content_type = \ 202. self._post_process_request(req, *resp) Local variables: Name Value chosen_handler chrome err (, ... handler req self * File ""build/bdist.linux-x86_64/egg/stractistics/web_ui.py"", line 116, in process_request Local variables: Name Value config {'wiki_ignored_authors': [], 'repository_ignored_authors': [], ... db elem ('User reports', 'user_reports') links [('Project reports', '/stractistics/project_reports'), ('User reports', ... module None req self strac_ref '/stractistics' * File ""build/bdist.linux-x86_64/egg/stractistics/global_reports.py"", line 31, in global_reports Local variables: Name Value config {'wiki_ignored_authors': [], 'repository_ignored_authors': [], ... db end_date datetime.datetime(2008, 5, 28, 11, 9, 29, 652479) req start_date datetime.datetime(2008, 3, 5, 11, 9, 29, 652479) weeks_back 12 * File ""build/bdist.linux-x86_64/egg/stractistics/global_reports.py"", line 64, in _repository_activity Local variables: Name Value AUTHORS_LIMIT 5 WEEKS_NUMBER 12 config {'wiki_ignored_authors': [], 'repository_ignored_authors': [], ... db end_date datetime.datetime(2008, 5, 28, 11, 9, 29, 652479) ignored_authors '' req start_date datetime.datetime(2008, 3, 5, 11, 9, 29, 652479) weeks_back 12 * File ""build/bdist.linux-x86_64/egg/stractistics/global_reports.py"", line 113, in _most_active_repository_authors Local variables: Name Value AUTHORS_LIMIT 5 authors [] db end_date datetime.datetime(2008, 5, 28, 11, 9, 29, 652479) ignored_authors '' map_rows sql_expr '\n SELECT r.author AS author, COUNT( r.author ) AS commits \n FROM ... start_date datetime.datetime(2008, 3, 5, 11, 9, 29, 652479) * File ""build/bdist.linux-x86_64/egg/stractistics/util.py"", line 117, in execute_sql_expression Local variables: Name Value cursor db map_rows sql_expr '\n SELECT r.author AS author, COUNT( r.author ) AS commits \n FROM ... * File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py"", line 51, in execute Code fragment: 46. # -- In case of SQL errors, uncomment the following 'print' statements 47. # print 'execute', repr(sql) 48. if args: 49. # print repr(args) 50. return self.cursor.execute(sql_escape_percent(sql), args) 51. return self.cursor.execute(sql) 52. 53. def executemany(self, sql, args=None): 54. # print 'executemany', repr(sql) 55. if args: 56. # print repr(args) Local variables: Name Value args None self sql '\n SELECT r.author AS author, COUNT( r.author ) AS commits \n FROM ... * File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py"", line 51, in execute Code fragment: 46. # -- In case of SQL errors, uncomment the following 'print' statements 47. # print 'execute', repr(sql) 48. if args: 49. # print repr(args) 50. return self.cursor.execute(sql_escape_percent(sql), args) 51. return self.cursor.execute(sql) 52. 53. def executemany(self, sql, args=None): 54. # print 'executemany', repr(sql) 55. if args: 56. # print repr(args) Local variables: Name Value args None self sql '\n SELECT r.author AS author, COUNT( r.author ) AS commits \n FROM ... * File ""/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py"", line 163, in execute Code fragment: 158. self.errorhandler(self, TypeError, m) 159. except: 160. exc, value, tb = exc_info() 161. del tb 162. self.messages.append((exc, value)) 163. self.errorhandler(self, exc, value) 164. self._executed = query 165. self._warning_check() 166. return r 167. 168. def executemany(self, query, args): Local variables: Name Value ListType TupleType args None charset 'utf8' db exc exc_info query '\n SELECT r.author AS author, COUNT( r.author ) AS commits \n FROM ... self value <_mysql_exceptions.ProgrammingError instance at 0x2aaad0d82518> * File ""/usr/lib64/python2.4/site-packages/MySQLdb/connections.py"", line 35, in defaulterrorhandler Code fragment: 30. cursor.messages.append(error) 31. else: 32. connection.messages.append(error) 33. del cursor 34. del connection 35. raise errorclass, errorvalue 36. 37. 38. class Connection(_mysql.connection): 39. 40. """"""MySQL Database Connection Object"""""" Local variables: Name Value error (, ... errorclass errorvalue <_mysql_exceptions.ProgrammingError instance at 0x2aaad0d82518> File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py"", line 417, in _dispatch_request dispatcher.dispatch(req) File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py"", line 197, in dispatch resp = chosen_handler.process_request(req) File ""build/bdist.linux-x86_64/egg/stractistics/web_ui.py"", line 116, in process_requestFile ""build/bdist.linux-x86_64/egg/stractistics/global_reports.py"", line 31, in global_reportsFile ""build/bdist.linux-x86_64/egg/stractistics/global_reports.py"", line 64, in _repository_activityFile ""build/bdist.linux-x86_64/egg/stractistics/global_reports.py"", line 113, in _most_active_repository_authorsFile ""build/bdist.linux-x86_64/egg/stractistics/util.py"", line 117, in execute_sql_expressionFile ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py"", line 51, in execute return self.cursor.execute(sql) File ""/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py"", line 51, in execute return self.cursor.execute(sql) File ""/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py"", line 163, in execute self.errorhandler(self, exc, value) File ""/usr/lib64/python2.4/site-packages/MySQLdb/connections.py"", line 35, in defaulterrorhandler raise errorclass, errorvalue }}} {{{ System Information: User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Trac: 0.11rc1 Python: 2.4.3 (#1, Mar 14 2007, 19:01:42) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] setuptools: 0.6c8 MySQL: server: ""5.1.22-rc-log"", client: ""5.0.22"", thread-safe: 0 MySQLdb: 1.2.1 Genshi: 0.5dev-r852 mod_python: 3.2.8 Subversion: 1.4.2 (r22196) jQuery: 1.2.3 }}}",defect,new,highest,StractisticsPlugin,blocker,,,dagomez mjrecena@…,0.11