Opened 9 years ago

Closed 9 years ago

#2488 closed defect (fixed)

MySQL SQL error /trac/screenshots

Reported by: john_wegis@… Owned by: Blackhex
Priority: normal Component: ScreenshotsPlugin
Severity: normal Keywords: mysql
Cc: Trac Release: 0.10


Not sure if the MySQL database is officially supported or not. The plugin seems to install correctly though. When I click on the "Screenshots" link (/trac/screenshots) in the header I get this error. All the components of the ScreenshotsPlugin are enabled.

Here's my configuration:

Python: 2.3.4
Trac: 0.10.4
TracTags: 0.6
Apache 2.0.52 + mod_wsgi-1.3
MySQL: 5.0.45
OS: Linux (CentOS) 2.6.9

Here's the error:

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/", line 406, in dispatch_request
  File "/usr/lib/python2.3/site-packages/trac/web/", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/TracScreenshots-0.5-py2.3.egg/tracscreenshots/", line 100, in process_request
    template, data, content_type = self._do_actions(req, actions)
  File "/usr/lib/python2.3/site-packages/TracScreenshots-0.5-py2.3.egg/tracscreenshots/", line 397, in _do_actions
    enabled_components, enabled_versions)
  File "/usr/lib/python2.3/site-packages/TracScreenshots-0.5-py2.3.egg/tracscreenshots/", line 86, in get_filtered_screenshots
    cursor.execute(sql, versions + components)
  File "/usr/lib/python2.3/site-packages/trac/db/", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.3/site-packages/trac/db/", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.3/site-packages/MySQLdb/", line 163, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.3/site-packages/MySQLdb/", line 35, 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 ') OR c.component IN ()' at line 1")

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by Blackhex

  • Resolution set to fixed
  • Status changed from new to closed

The problem was with empty IN() statement but according to MySQL manual there is no mention that IN() statement could not be empty. Try it with r3161, should be OK.

Add Comment

Modify Ticket

as closed The owner will remain Blackhex.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.