Opened 9 years ago

Last modified 8 years ago

defect #57 (closed: DONE)

roadmap page throws error after install

Test Complete Size: 1 Test Complete Date: 01/19/2009
Documentation Complete Size: 1 Documentation Complete Date: 01/19/2009
Acceptance Complete Size: 0 Acceptance Complete Date:
Reported by: achmed Owned by: ja11sop
Milestone: Clean up of Plugin with Patch Component: agiletrac patch to core
Version: Keywords:
Cc: achmed@… Blocked By:
Blocking: Patch SVN Revision:
Patch Trac Version:
In Iterations: 15 17

Description

Roadmap page produces this error after patch and install:

Trac detected an internal error: ProgrammingError?: non-integer constant in ORDER BY

  • File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 423, in _dispatch_request Code fragment:
    1. try:
    2. if not env and env_error:
    3. raise HTTPInternalError(env_error)
    4. try:
    5. dispatcher = RequestDispatcher?(env)
    6. dispatcher.dispatch(req)
    7. except RequestDone?:
    8. pass
    9. resp = req._response or []
    10. 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 0xb74145cc> e <psycopg2.ProgrammingError? instance at 0xb6dcb82c> env <trac.env.Environment object at 0xb7cc5fac> env_error None exc_info (<class psycopg2.ProgrammingError? at 0xb75a683c>, ... filename '/usr/lib/python2.4/site-packages/Trac-0.11.1-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 422 message u'ProgrammingError?: non-integer constant in ORDER BY\n' req <Request "GET u'/roadmap'"> resp [] tb <traceback object at 0xb6dd016c> tb_hide None traceback 'Traceback (most recent call last):\n File ...
  • File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 197, in dispatch Code fragment:
    1. req.args.get('FORM_TOKEN') != req.form_token:
    2. raise HTTPBadRequest('Missing or invalid form token. '
    3. 'Do you have cookies enabled?')
    4. # Process the request and render the template
    5. resp = chosen_handler.process_request(req)
    6. if resp:
    7. if len(resp) == 2: # Clearsilver
    8. chrome.populate_hdf(req)
    9. template, content_type = \
    10. self._post_process_request(req, *resp)
  • Local variables: Name Value chosen_handler <trac.ticket.roadmap.RoadmapModule? object at 0xb74149ec> chrome <trac.web.chrome.Chrome object at 0xb75aba6c> err (<class psycopg2.ProgrammingError? at 0xb75a683c>, ... handler <trac.ticket.roadmap.RoadmapModule? object at 0xb74149ec> req <Request "GET u'/roadmap'"> self <trac.web.main.RequestDispatcher? object at 0xb74145cc>
  • File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/ticket/roadmap.py", line 756, in process_request Code fragment:
    1. # range
    2. expected_completion_dates = []
    3. for milestone in milestones:
    4. tickets = get_tickets_for_milestone(self.env, db, milestone.name,
    5. 'owner')
    6. tickets = TicketSystem?(self.env).apply_ticket_permissions(req, tickets)
    7. milestone_sizing_stats = TicketSystem?(self.env).get_sizing_statistics_for_milestones([milestone.name])
    8. stat = get_ticket_stats(self.stats_provider, tickets, milestone_sizing_stats, None)
    9. stats.append(milestone_stats_data(req, stat, milestone.name))
  • Local variables: Name Value db <trac.db.pool.PooledConnection? object at 0xb7414e2c> expected_completion_dates [] m <trac.ticket.model.Milestone object at 0xb6dcb8cc> milestone <trac.ticket.model.Milestone object at 0xb6dcb7ec> milestone_realm <Resource 'milestone'> milestones [<trac.ticket.model.Milestone object at 0xb6dcb7ec>, ... now datetime.datetime(2008, 10, 15, 4, 54, 28, 205430, tzinfo=<FixedOffset? ... points_per_period {'points': 0, 'period': datetime.timedelta(0)} queries [] req <Request "GET u'/roadmap'"> rolling_date datetime.datetime(2008, 10, 15, 4, 54, 28, 205430, tzinfo=<FixedOffset? ... self <trac.ticket.roadmap.RoadmapModule? object at 0xb74149ec> showall False stats [] ticket_infos []
  • File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/ticket/roadmap.py", line 309, in get_tickets_for_milestone Code fragment:
    1. def get_tickets_for_milestone(env, db, milestone, field='component'):
    2. from trac.ticket import Ticket
    3. tickets = []
    4. cursor = db.cursor()
    5. cursor.execute("SELECT id FROM ticket WHERE milestone=%s "
    6. "ORDER BY %s", (milestone,field))
    7. ticket_ids = [str(row[0]) for row in cursor]
    8. for ticket_id in ticket_ids:
    9. ticket = Ticket(env, ticket_id, db)
    10. if ticket.exists:
    11. tickets.append(ticket)
  • Local variables: Name Value Ticket <class 'trac.ticket.model.Ticket'> cursor <trac.db.util.IterableCursor? object at 0xb77ae50c> db <trac.db.pool.PooledConnection? object at 0xb7414e2c> env <trac.env.Environment object at 0xb7cc5fac> field 'owner' milestone u'milestone1' tickets []
  • File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/util.py", line 50, in execute Code fragment:
    1. def execute(self, sql, args=None):
    2. # -- In case of SQL errors, uncomment the following 'print' statements
    3. # print 'execute', repr(sql)
    4. if args:
    5. # print repr(args)
    6. return self.cursor.execute(sql_escape_percent(sql), args)
    7. return self.cursor.execute(sql)
    8. def executemany(self, sql, args=None):
    9. # print 'executemany', repr(sql)
    10. if args:
  • Local variables: Name Value args (u'milestone1', 'owner') self <trac.db.util.IterableCursor? object at 0xb77ae50c> sql 'SELECT id FROM ticket WHERE milestone=%s ORDER BY %s'
  • File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/util.py", line 50, in execute Code fragment:
    1. def execute(self, sql, args=None):
    2. # -- In case of SQL errors, uncomment the following 'print' statements
    3. # print 'execute', repr(sql)
    4. if args:
    5. # print repr(args)
    6. return self.cursor.execute(sql_escape_percent(sql), args)
    7. return self.cursor.execute(sql)
    8. def executemany(self, sql, args=None):
    9. # print 'executemany', repr(sql)
    10. if args:
  • Local variables: Name Value args (u'milestone1', 'owner') self <trac.db.util.IterableCursor? object at 0xb77ae05c> sql 'SELECT id FROM ticket WHERE milestone=%s ORDER BY %s'

File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 423, in _dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 197, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/ticket/roadmap.py", line 756, in process_request

'owner')

File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/ticket/roadmap.py", line 309, in get_tickets_for_milestone

"ORDER BY %s", (milestone,field))

File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/util.py", line 50, in execute

return self.cursor.execute(sql_escape_percent(sql), args)

File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/util.py", line 50, in execute

return self.cursor.execute(sql_escape_percent(sql), args)

Change History

Have a look at the list of modified files related to this ticket.

follow-up: ↓ 2   Changed 9 years ago by ja11sop

Can you check three things for me?

  1. Is the plugin actually enabled (in addition to your trac install being patched and the plugin being installed)? It must be first enabled in the <trac-env>/conf/trac.ini file.
  2. Is this install on a clean trac environment or an existing one, already populated with tickets? It currently does not upgrade tickets to work with the plugin.
  3. Finally did you patch using the correct version, 0.11.1 in your case I believe. The 0.ii patch will not work.

Thanks, ja11sop

in reply to: ↑ 1   Changed 9 years ago by jbr

Hi - I had the same error after a clean & correct install per above - after some digging, I fixed it by upgrading my environment's version of sqlite3 and pysqlite2

  Changed 9 years ago by ja11sop

  • test_complete_size changed from undefined to 1
  • doc_complete_size changed from undefined to 1
  • acceptance_complete_size changed from undefined to 0

Note that #62 is a duplicate of this issue. Thanks very much for reporting your resolution to this issue. Environmental issues are always hard to track down. Will close off this issue once this is documented as a dependency so others won't have to ponder this or search through the tickets to find the cause.

  Changed 8 years ago by ja11sop

  • doc_complete_date set to 01/19/09
  • test_complete_date set to 01/19/09
Note: See TracTickets for help on using tickets.