Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11433 closed defect (fixed)

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 '== 'status' \n ORDER BY tc.time' at line 4")

Reported by: Zinway Owned by: Ryan J Ollos
Priority: normal Component: TracTicketStatsPlugin
Severity: normal Keywords:
Cc: tuhui@… Trac Release: 1.0

Description

How to Reproduce

While doing a GET operation on /ticketstats, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{}

User agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1712.4 Safari/537.36

System Information

Trac 1.0.1
Trac 1.0.1
Babel 0.9.4
Docutils 0.6
Genshi 0.6 (without speedups)
mod_wsgi 3.4 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
MySQL server: "5.1.71", client: "5.1.71", thread-safe: 1
MySQLdb 1.2.3c1
Pygments 1.4
Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
pytz 2010h
pytz 2010h
setuptools 0.6
setuptools 0.6
Subversion 1.7.4 (r1295709)
jQuery 1.7.2

Enabled Plugins

AutocompleteUsers 0.4.2dev-r0
CKIntegration 1.1dev
GridModify 0.1.6dev-r0
IniAdmin 0.3-r0
LoomingClouds 0.12r1
TicketCalendarPlugin 0.12.0.2
TracAccountManager 0.5dev-r0
TracAnnouncer 1.0dev-r0
TracCAS 2.0.1
TracCustomFieldAdmin 0.2.8-r0
TracDragDrop 0.12.0.11-r0
TracPermRedirect 3.0
TracSubcomponents 1.2.0
TracTags 0.6
TracTicketCharts 0.2dev-r0
Tracticketstats 3.0.0dev-r0
TracUserManagerPlugin 0.5dev-r0
TracWorkflowAdmin 0.12.0.2

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.6/site-packages/Tracticketstats-3.0.0dev_r0-py2.6.egg/ticketstats/ticketstats.py", line 119, in process_request
    last_num_open = get_num_open_tix(db, last_date, milestone)
  File "/usr/lib/python2.6/site-packages/Tracticketstats-3.0.0dev_r0-py2.6.egg/ticketstats/ticketstats.py", line 237, in get_num_open_tix
    ORDER BY tc.time""" % milestone_str, args)
  File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/db/util.py", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
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 '== 'status' \n        ORDER BY tc.time' at line 4")

Attachments (6)

no_data.png (13.1 KB) - added by Zinway 11 years ago.
ts.01.jpg (312.9 KB) - added by Zinway 11 years ago.
ts.02.jpg (142.5 KB) - added by Zinway 11 years ago.
ts.03.jpg (697.4 KB) - added by Zinway 11 years ago.
ts.04.jpg (667.1 KB) - added by Zinway 11 years ago.
ts.03.00.jpg (603.3 KB) - added by Zinway 11 years ago.

Change History (17)

comment:1 Changed 11 years ago by Jun Omae

#11447 was closed as duplicate.

comment:2 Changed 11 years ago by Ryan J Ollos

Cc: tuhui@… added; anonymous removed
Status: newaccepted

It looks like I've made a pretty stupid error in using the incorrect equality operator. Please report back if the fix I push next works for you.

comment:3 Changed 11 years ago by Ryan J Ollos

In 13533:

Fix error in equality operator. Refs #11433.

comment:4 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

Please reopen if you find that the issue is not fixed.

Changed 11 years ago by Zinway

Attachment: no_data.png added

comment:5 Changed 11 years ago by anonymous

Thanks,the error is fixed,but my ticketstats has no data. How can I debug this?

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:6 Changed 11 years ago by Ryan J Ollos

Do you think it is an issue with Flash player (#11440), or that the query is incorrect?

comment:7 in reply to:  6 Changed 11 years ago by Zinway

Replying to rjollos:

Do you think it is an issue with Flash player (#11440), or that the query is incorrect?

Right click the Flash Player(version:12.0.0.38),it says there is no data. Maybe there is something wrong with the scripts of using YUI. Can we just print the data to debug this?

Changed 11 years ago by Zinway

Attachment: ts.01.jpg added

Changed 11 years ago by Zinway

Attachment: ts.02.jpg added

Changed 11 years ago by Zinway

Attachment: ts.03.jpg added

Changed 11 years ago by Zinway

Attachment: ts.04.jpg added

comment:8 Changed 11 years ago by Zinway

I have fixed the issue about no data.

Finally I find that there is no error with the scripts,just something wrong with the cdn of YUI website.

The url of charts.swf is not found,then I download the YUI.zip and use the local js sources.

With a flush,the chart is out. :)

Last edited 11 years ago by Zinway (previous) (diff)

comment:9 Changed 11 years ago by Ryan J Ollos

What version of YUI did you download? In #11440, I was suggesting we might try the new version, 3.14.

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:10 Changed 11 years ago by Zinway

2.9.0 The path of js files is different between 2.9.0 and 3.14

Changed 11 years ago by Zinway

Attachment: ts.03.00.jpg added

comment:11 in reply to:  10 Changed 11 years ago by Ryan J Ollos

Replying to zinway:

2.9.0 The path of js files is different between 2.9.0 and 3.14

Thanks, I will try to get it resolved in #11440.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.