I have a new installation of Trac 0.11.7 and Agilo 1.2.1 running and
am receiving this error when selecting all but one of my backlog
milestones. I have 3 milestones. Only one 'working' has a sprint
assigned with open tickets. The other milestones which are producing
this error do not have any tickets or sprints associated with them.

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 ticket.milestone='Physical Engine v1.1')
UNION SELECT src, type FROM agilo_' at line 1")

Most recent call last:

    * File "c:\program files\python25\lib\site-packages\Trac-0.11.7-
py2.5.egg\trac\web\main.py", line 450, in _dispatch_request
      Code fragment:
       445. try:
       446. if not env and env_error:
       447. raise HTTPInternalError(env_error)
       448. try:
       449. dispatcher = RequestDispatcher(env)
       450. dispatcher.dispatch(req)
       451. except RequestDone:
       452. pass
       453. resp = req._response or []
       454.
       455. 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        <trac.web.main.RequestDispatcher object at
0x040AED30>
      e         ProgrammingError(1064, "You have an error in your SQL syntax;
check the ...
      env       <trac.env.Environment object at 0x03C30F10>
      env_error         None
      exc_info  (<class '_mysql_exceptions.ProgrammingError'>,
ProgrammingError(1064, "You ...
      filename  'c:\\program ...
      frames    [{'function': '_dispatch_request', 'lines_before': [u'
try:', u' ...
      has_admin         True
      line      u' dispatcher.dispatch(req)'
      lineno    449
      message   u'ProgrammingError: (1064, "You have an error in your
SQL syntax; check ...
      req       <Request "GET u'/backlog/Tasking'">
      resp      []
      tb        <traceback object at 0x041CBFD0>
      tb_hide   None
      traceback         u'Traceback (most recent call last):\n File "c:\
\program ...
    * File "c:\program files\python25\lib\site-packages\Trac-0.11.7-
py2.5.egg\trac\web\main.py", line 206, in dispatch
      Code fragment:
       201. req.args.get('__FORM_TOKEN') != req.form_token:
       202. raise HTTPBadRequest('Missing or invalid form token. '
       203. 'Do you have cookies enabled?')
       204.
       205. # Process the request and render the template
       206. resp = chosen_handler.process_request(req)
       207. if resp:
       208. if len(resp) == 2: # Clearsilver
       209. chrome.populate_hdf(req)
       210. template, content_type = \
       211. self._post_process_request(req, *resp)
      Local variables:
      Name      Value
      chosen_handler    <agilo.scrum.backlog.new_webui.NewBacklogView
object at 0x040B4D70>
      chrome    <trac.web.chrome.Chrome object at 0x040AED10>
      err       (<class '_mysql_exceptions.ProgrammingError'>,
ProgrammingError(1064, "You ...
      handler   <agilo.scrum.backlog.new_webui.NewBacklogView object at
0x040B4D70>
      req       <Request "GET u'/backlog/Tasking'">
      self      <trac.web.main.RequestDispatcher object at 0x040AED30>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\api\view.py", line 155, in
process_request
      Code fragment:
       150. basically, than send a Command Request to a Controller.
The
       151. response has to be rendered according to the view
needs."""
       152. try:
       153. handler = self.get_handler(req)
       154. if handler is not None:
       155. return self._call_filters_and_handler(req, handler)
       156. else:
       157. raise TracError('No handler found for method %s' %
req.method)
       158. except ICommand.NotValidError, e:
       159. chrome.add_warning(req, unicode(e))
       160. # not that we update the data, so that the set value are
      Local variables:
      Name      Value
      handler   <bound method NewBacklogView.do_get of ...
      req       <Request "GET u'/backlog/Tasking'">
      self      <agilo.scrum.backlog.new_webui.NewBacklogView object at
0x040B4D70>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\api\view.py", line 143, in
_call_filters_and_handler
      Code fragment:
       138. return True
       139.
       140. def _call_filters_and_handler(self, req, handler):
       141. for filter in self.filters:
       142. filter.pre_process_request(req)
       143. data = handler(req) or {}
       144. for filter in self.filters:
       145. filter.post_process_request(req)
       146. return self.respond(data)
       147.
       148. def process_request(self, req):
      Local variables:
      Name      Value
      filter
<agilo_pro.backlog_in_place_editing.NewBacklogInPlaceEditingInjector ...
      handler   <bound method NewBacklogView.do_get of ...
      req       <Request "GET u'/backlog/Tasking'">
      self      <agilo.scrum.backlog.new_webui.NewBacklogView object at
0x040B4D70>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\scrum\backlog\new_webui.py",
line 160, in do_get
      Code fragment:
       155.
       156. # Public methods
       157.
       158. def do_get(self, req):
       159. self._assert_can_view_backlog(req)
       160. backlog = self._get_backlog(req)
       161.
       162. self._show_no_sprint_if_necessary(req, backlog)
       163. SessionScope(req).set_scope(backlog.scope, backlog.b_type)
       164. self._add_js_and_css_files(req)
       165. backlog_info = self._backlog_information(req, backlog)
      Local variables:
      Name      Value
      req       <Request "GET u'/backlog/Tasking'">
      self      <agilo.scrum.backlog.new_webui.NewBacklogView object at
0x040B4D70>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\scrum\backlog\new_webui.py",
line 63, in _get_backlog
      Code fragment:
        58.
        59. def _get_backlog(self, req):
        60. scope = req.args.get('scope') or req.args.get('bscope')
        61. name = req.args['name']
        62.
        63. return BacklogController(self.env).get(name=name,
scope=scope)
        64.
        65. def _configured_child_types(self, req):
        66. view = ConfiguredChildTypesView(self.env)
        67. return view.do_get(req, req.args)
        68.
      Local variables:
      Name      Value
      name      u'Tasking'
      req       <Request "GET u'/backlog/Tasking'">
      scope     u'Physical Engine v1.1'
      self      <agilo.scrum.backlog.new_webui.NewBacklogView object at
0x040B4D70>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\scrum\backlog\controller.py",
line 36, in get
      Code fragment:
        31. self.manager = BacklogModelManager(self.env)
        32.
        33.
        34. def get(self, name, scope, load=True):
        35. cmd_get = BacklogController.GetBacklogCommand(self.env,
name=name, scope=scope, load=load)
        36. backlog = self.process_command(cmd_get)
        37. # TODO: Guard against bad backlog names!
        38. return backlog
        39.
        40.
        41. class GetBacklogCommand(controller.ICommand):
      Local variables:
      Name      Value
      cmd_get   <agilo.scrum.backlog.controller.GetBacklogCommand
object at 0x040A8410>
      load      True
      name      u'Tasking'
      scope     u'Physical Engine v1.1'
      self      <agilo.scrum.backlog.controller.BacklogController object
at 0x040A85F0>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\api\controller.py", line 333,
in process_command
      Code fragment:
       328. if not
self._check_command_is_for_this_controller(command):
       329. raise self.CommandNotFoundError("The command (%s) was " \
       330. "not found on this " \
       331. "controller" % command)
       332. try:
       333. return command.execute(self, date_converter, as_key)
       334. except Exception, e:
       335. if not isinstance(e, ICommand.CommandError):
       336. e = ICommand.CommandError(to_unicode(e))
       337. #raise e
       338. raise
      Local variables:
      Name      Value
      as_key    None
      command   <agilo.scrum.backlog.controller.GetBacklogCommand
object at 0x040A8410>
      date_converter    None
      e         CommandError(u'(1064, "You have an error in your SQL syntax;
check the ...
      self      <agilo.scrum.backlog.controller.BacklogController object
at 0x040A85F0>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\api\controller.py", line 286,
in execute
      Code fragment:
       281. command can be executed, normally called by the controller
       282. """
       283. if self._errors and len(self._errors) > 0:
       284. self._raise_errors()
       285. else:
       286. return self._execute(controller, date_converter, as_key)
       287.
       288. def _execute(self, controller, date_converter=None,
as_key=None):
       289. """
       290. Execute the command, needs to have a controller reference
to
       291. access the environment and other members specific to the
      Local variables:
      Name      Value
      as_key    None
      controller        <agilo.scrum.backlog.controller.BacklogController
object at 0x040A85F0>
      date_converter    None
      self      <agilo.scrum.backlog.controller.GetBacklogCommand object
at 0x040A8410>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\scrum\backlog\controller.py",
line 61, in _execute
      Code fragment:
        56. def _execute(self, backlog_controller, date_converter,
as_key):
        57. return backlog_controller.manager.get(name=self.name,
        58. scope=self.scope,
        59. reload=self.reload,
        60. filter_by=self.filter_by,
        61. load=self.load)
        62.
        63.
        64. class ListBacklogsCommand(controller.ICommand):
        65. """Returns the list of Backlogs available"""
        66. parameters = {}
      Local variables:
      Name      Value
      as_key    None
      backlog_controller
<agilo.scrum.backlog.controller.BacklogController object at
0x040A85F0>
      date_converter    None
      self      <agilo.scrum.backlog.controller.GetBacklogCommand object
at 0x040A8410>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\scrum\backlog\model.py", line
1059, in get
      Code fragment:
      1054. set to global if is not set"""
      1055. if kwargs.get('scope') is None:
      1056. kwargs['scope'] = 'global'
      1057. reload = kwargs.pop('reload', False)
      1058. filter = kwargs.setdefault('filter_by', None)
      1059. backlog = super(BacklogModelManager, self).get(**kwargs)
      1060. if backlog is None:
      1061. return None
      1062. # AT: we need to apply the filter
      1063. if filter is not None:
      1064. backlog.filter_by = filter
      Local variables:
      Name      Value
      filter    None
      kwargs    {'load': True, 'scope': u'Physical Engine v1.1',
'filter_by': None, ...
      reload    None
      self      <agilo.scrum.backlog.model.BacklogModelManager object at
0x040B4F30>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\core\model.py", line 1001, in
get
      Code fragment:
       996. # try to get it from the cache
       997. m = self.get_cache().get(tuple(l))
       998. if m:
       999. return m
      1000. # Not in cache
      1001. m = self.model(self.env, **kwargs)
      1002. if m.exists:
      1003. self.get_cache().set(self._get_model_key(m), m)
      1004. return m
      1005.
      1006. def create(self, save=True, **kwargs):
      Local variables:
      Name      Value
      _find_in_kwargs   <function _find_in_kwargs at 0x0408A770>
      cache_key         [['name', 'scope'], None]
      constraints       None
      kwargs    {'load': True, 'scope': u'Physical Engine v1.1', 'name':
u'Tasking', ...
      l         [(u'Tasking', u'Physical Engine v1.1'), ()]
      l_constraints     ()
      l_pk      (u'Tasking', u'Physical Engine v1.1')
      m         None
      pk        ['name', 'scope']
      self      <agilo.scrum.backlog.model.BacklogModelManager object at
0x040B4F30>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\scrum\backlog\model.py", line
215, in __init__
      Code fragment:
       210. self._tickets = list() # List of Backlog Items
       211. # This is only for additional filtering of backlogs by an
additional
       212. # ticket attribute. 'filter_by' holds the attribute value
which should
       213. # be shown.
       214. self.filter_by = filter_by
       215. if not self._load(load):
       216. self.ticket_types = list(ticket_types)
       217. self.sorting_keys = list(sorting_keys)
       218. # Loads the allowed tickets for this Backlog
       219. if self.b_type == BacklogType.GLOBAL: # if is a global
backlog
       220. self.reload()
      Local variables:
      Name      Value
      b_strict  False
      b_type    0
      description       ''
      env       <trac.env.Environment object at 0x03C30F10>
      filter_by         None
      load      True
      name      u'Tasking'
      scope     u'Physical Engine v1.1'
      self      <agilo.scrum.backlog.model.Backlog object at 0x042A9F10>
      sorting_keys      []
      ticket_types      []
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\scrum\backlog\model.py", line
888, in _load
      Code fragment:
       883. self.ticket_types = config.ticket_types
       884. self._sorting_keys = config.sorting_rules
       885. self._exists = True
       886.
       887. if load:
       888. self._load_allowed_tickets(db)
       889.
       890. return True
       891. except Exception, e:
       892. raise
       893. self.env.log.exception(exception_to_unicode(e))
      Local variables:
      Name      Value
      config    <agilo.scrum.backlog.backlog_config.BacklogConfiguration
object at ...
      db        <trac.db.pool.PooledConnection object at 0x041E1260>
      e         ProgrammingError(1064, "You have an error in your SQL syntax;
check the ...
      handle_ta         True
      load      True
      self      <agilo.scrum.backlog.model.Backlog object at 0x042A9F10>
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\scrum\backlog\model.py", line
794, in _load_allowed_tickets
      Code fragment:
       789. cursor = db.cursor()
       790. # Get position and level for existing tickets
       791. tickets_pos_level =
self._load_backlog_tickets_position(db)
       792.
       793. debug(self, "Other Tickets query: %s" % sql_allowed)
       794. safe_execute(cursor, sql_allowed, sql_args)
       795. # Load the tickets in the backlog
       796. for t_id, t_type in cursor:
       797. t_pos = None
       798. t_level = 0
       799. # if the ticket is already in the backlog skip it
      Local variables:
      Name      Value
      SprintModelManager        <class
'agilo.scrum.sprint.model.SprintModelManager'>
      cursor    <trac.db.util.IterableCursor object at 0x042A9ED0>
      db        <trac.db.pool.PooledConnection object at 0x041E1260>
      scope_clause      'AND ticket_custom.value in () OR ticket.milestone=
%(milestone)s)'
      self      <agilo.scrum.backlog.model.Backlog object at 0x042A9F10>
      sprint_patterns   []
      sprints   []
      sql_allowed       "SELECT DISTINCT id, type FROM ticket LEFT OUTER
JOIN ticket_custom ON ...
      sql_args  {'milestone': u'Physical Engine v1.1'}
      sql_extra_scope   "AND ((ticket_custom.name='sprint' AND
ticket_custom.value in () OR ...
      sql_from  'ticket LEFT OUTER JOIN ticket_custom ON
ticket.id=ticket_custom.ticket'
      sql_linked        " UNION SELECT src, type FROM agilo_link JOIN ticket
ON src=id LEFT OUTER ...
      sql_scope         "AND (ticket_custom.name='sprint' AND
ticket_custom.value in () OR ...
      sql_sprint_list   ''
      tickets_pos_level         {}
    * File "c:\program files\python25\lib\site-packages
\binary_agilo-1.2.1_PRO-py2.5.egg\agilo\core\model.py", line 79, in
safe_execute
      Code fragment:
        74. dummy_name = 'auto_name%d' % i
        75. replacement = '%%(%s)s' % dummy_name
        76. new_sql = new_sql[:match.start()] + replacement +
new_sql[match.end():]
        77. args[dummy_name] = value
        78. sql = new_sql
        79. return cursor.execute(sql, args)
        80.
        81.
        82. class Field(Column):
        83. """Represent a persistent class field"""
        84. def __init__(self, name='field', type='text',
primary_key=False,
      Local variables:
      Name      Value
      args      [u'Physical Engine v1.1', u'Physical Engine v1.1',
u'Physical Engine ...
      cursor    <trac.db.util.IterableCursor object at 0x042A9ED0>
      match     <_sre.SRE_Match object at 0x0408A360>
      new_args  [u'Physical Engine v1.1', u'Physical Engine v1.1',
u'Physical Engine ...
      new_sql   "SELECT DISTINCT id, type FROM ticket LEFT OUTER JOIN
ticket_custom ON ...
      sql       "SELECT DISTINCT id, type FROM ticket LEFT OUTER JOIN
ticket_custom ON ...
    * File "c:\program files\python25\lib\site-packages\Trac-0.11.7-
py2.5.egg\trac\db\util.py", line 64, in execute
      Code fragment:
        59. return r
        60. except Exception, e:
        61. self.log.debug('execute exception: %r', e)
        62. raise
        63. if args:
        64. return self.cursor.execute(sql_escape_percent(sql), args)
        65. return self.cursor.execute(sql)
        66.
        67. def executemany(self, sql, args=None):
        68. if self.log:
        69. self.log.debug('SQL: %r', sql)
      Local variables:
      Name      Value
      args      [u'Physical Engine v1.1', u'Physical Engine v1.1',
u'Physical Engine ...
      self      <trac.db.util.IterableCursor object at 0x042A9ED0>
      sql       "SELECT DISTINCT id, type FROM ticket LEFT OUTER JOIN
ticket_custom ON ...
    * File "C:\Program Files\Python25\lib\site-packages\MySQLdb
\cursors.py", line 166, in execute
      Code fragment:
       161. self.errorhandler(self, TypeError, m)
       162. except:
       163. exc, value, tb = exc_info()
       164. del tb
       165. self.messages.append((exc, value))
       166. self.errorhandler(self, exc, value)
       167. self._executed = query
       168. if not self._defer_warnings: self._warning_check()
       169. return r
       170.
       171. def executemany(self, query, args):
      Local variables:
      Name      Value
      ListType  <type 'list'>
      TupleType         <type 'tuple'>
      args      [u'Physical Engine v1.1', u'Physical Engine v1.1',
u'Physical Engine ...
      charset   'utf8'
      db        <weakproxy at 04094B70 to Connection at 035F6B00>
      exc       <class '_mysql_exceptions.ProgrammingError'>
      exc_info  <built-in function exc_info>
      query     "SELECT DISTINCT id, type FROM ticket LEFT OUTER JOIN
ticket_custom ON ...
      self      <trac.db.mysql_backend.MySQLUnicodeCursor object at
0x042A9430>
      value     ProgrammingError(1064, "You have an error in your SQL
syntax; check the ...
    * File "C:\Program Files\Python25\lib\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     (<class '_mysql_exceptions.ProgrammingError'>,
ProgrammingError(1064, "You ...
      errorclass        <class '_mysql_exceptions.ProgrammingError'>
      errorvalue        ProgrammingError(1064, "You have an error in your
SQL syntax; check the ...


Trac:   0.11.7
Python:         2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)]
setuptools:     0.6c11
MySQL:  server: "5.0.51a-community-nt", client: "5.0.27", thread-safe:
1
MySQLdb:        1.2.2
Genshi:         0.5.1
mod_python:     3.3.1
Agilo:  1.2.1-pro
Subversion:     1.6.5 (r38866)
jQuery: 1.2.6

-- 
Follow Agilo on Twitter: http://twitter.com/agiloforscrum
-----
You received this message because you are subscribed to the Google
Groups "Agilo for Scrum" group. This group is moderated by agile42 GmbH 
http://www.agile42.com and is focused in supporting Agilo for Scrum users.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/agilo?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to