vanaja Jagini wrote:
> Hi All,
>
> All my ticket reports were working fine in  trac .11 version. I 
> updated to 0.11.5stable-r8210 version, Now i see issues for reports 
> which are grouped by milestone.  Please  can you help me to solve this 
> issue.  Here is the issue:
>
> Trac detected an internal error:
>
> OperationalError: ambiguous column name: priority
>
>
>     Python Traceback
>
> Most recent call last:
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/web/main.py",
>       line *444*, in _dispatch_request
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame0>
>
>
>
>             Code fragment:
>
>        439. | try:|
>
>        440. | if not env and env_error:|
>
>        441. | raise HTTPInternalError(env_error)|
>
>        442. | try:|
>
>        443. | dispatcher = RequestDispatcher(env)|
>
>        444. | dispatcher.dispatch(req)|
>
>        445. | except RequestDone:|
>
>        446. | pass|
>
>        447. | resp = req._response or []|
>
>        448. | |
>
>        449. | 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 0x834077ec>|
>
>       e
>
>               |OperationalError('ambiguous column name: priority',)|
>
>       env
>
>               |<trac.env.Environment object at 0x82d327ec>|
>
>       env_error
>
>               |None|
>
>       exc_info
>
>               |(<class 'pysqlite2.dbapi2.OperationalError'>,
>       OperationalError('ambiguous ...|
>
>       filename
>
>               
> |'/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/we
>       ...|
>
>       frames
>
>               |[{'function': '_dispatch_request', 'lines_before': [u' try:',
>       u' ...|
>
>       has_admin
>
>               |True|
>
>       line
>
>               |u' dispatcher.dispatch(req)'|
>
>       lineno
>
>               |443|
>
>       message
>
>               |u'OperationalError: ambiguous column name: priority'|
>
>       req
>
>               |<Request "GET u'/query'">|
>
>       resp
>
>               |[]|
>
>       tb
>
>               |<traceback object at 0x83bd748c>|
>
>       tb_hide
>
>               |None|
>
>       traceback
>
>               |u'Traceback (most recent call last):\n File ...|
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/web/main.py",
>       line *205*, in dispatch
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame1>
>
>
>
>             Code fragment:
>
>        200. | req.args.get('__FORM_TOKEN') != req.form_token:|
>
>        201. | raise HTTPBadRequest('Missing or invalid form token. '|
>
>        202. | 'Do you have cookies enabled?')|
>
>        203. | |
>
>        204. | # Process the request and render the template|
>
>        205. | resp = chosen_handler.process_request(req)|
>
>        206. | if resp:|
>
>        207. | if len(resp) == 2: # Clearsilver|
>
>        208. | chrome.populate_hdf(req)|
>
>        209. | template, content_type = \|
>
>        210. | self._post_process_request(req, *resp)|
>
>
>             Local variables:
>
>       Name
>
>               Value
>
>       chosen_handler
>
>               |<trac.ticket.query.QueryModule object at 0x834078cc>|
>
>       chrome
>
>               |<trac.web.chrome.Chrome object at 0x833722ec>|
>
>       err
>
>               |(<class 'pysqlite2.dbapi2.OperationalError'>,
>       OperationalError('ambiguous ...|
>
>       handler
>
>               |<trac.ticket.query.QueryModule object at 0x834078cc>|
>
>       req
>
>               |<Request "GET u'/query'">|
>
>       self
>
>               |<trac.web.main.RequestDispatcher object at 0x834077ec>|
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/ticket/query.py",
>       line *834*, in process_request
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame2>
>
>
>
>             Code fragment:
>
>        829. | |
>
>        830. | if format:|
>
>        831. | Mimeview(self.env).send_converted(req,
>             'trac.ticket.Query', query,|
>
>        832. | format, filename=None)|
>
>        833. | |
>
>        834. | return self.display_html(req, query)|
>
>        835. | |
>
>        836. | # Internal methods|
>
>        837. | |
>
>        838. | def _get_constraints(self, req):|
>
>        839. | constraints = {}|
>
>
>             Local variables:
>
>       Name
>
>               Value
>
>       args
>
>               |{'status': u'testing', 'group': u'milestone', 'col': [u'id',
>       u'summary', ...|
>
>       cols
>
>               |[u'id', u'summary', u'type', u'priority', u'component']|
>
>       constraints
>
>               |{'status': [u'testing'], 'owner': [u'[email protected]
>       <mailto:[email protected]>']}|
>
>       conversion
>
>               |('tab', 'Tab-delimited Text', 'tsv', 'trac.ticket.Query', ...|
>
>       format
>
>               |None|
>
>       max
>
>               |None|
>
>       query
>
>               |<trac.ticket.query.Query object at 0x83787c4c>|
>
>       req
>
>               |<Request "GET u'/query'">|
>
>       rows
>
>               |[]|
>
>       self
>
>               |<trac.ticket.query.QueryModule object at 0x834078cc>|
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/ticket/query.py",
>       line *887*, in display_html
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame3>
>
>
>
>             Code fragment:
>
>        882. | query_time = int(req.session.get('query_time', 0))|
>
>        883. | query_time = datetime.fromtimestamp(query_time, utc)|
>
>        884. | query_constraints = unicode(query.constraints)|
>
>        885. | if query_constraints !=
>             req.session.get('query_constraints') \|
>
>        886. | or query_time < orig_time - timedelta(hours=1):|
>
>        887. | tickets = query.execute(req, db)|
>
>        888. | # New or outdated query, (re-)initialize session vars|
>
>        889. | req.session['query_constraints'] = query_constraints|
>
>        890. | req.session['query_tickets'] = ' '.join([str(t['id'])|
>
>        891. | for t in tickets])|
>
>        892. | else:|
>
>
>             Local variables:
>
>       Name
>
>               Value
>
>       db
>
>               |<trac.db.pool.PooledConnection object at 0x83aa2ecc>|
>
>       orig_list
>
>               |None|
>
>       orig_time
>
>               |datetime.datetime(2009, 5, 21, 21, 31, 56, 116967,
>       tzinfo=<FixedOffset ...|
>
>       query
>
>               |<trac.ticket.query.Query object at 0x83787c4c>|
>
>       query_constraints
>
>               |u"{'status': [u'testing'], 'owner':
>       [u'[email protected] <mailto:[email protected]>']}"|
>
>       query_time
>
>               |datetime.datetime(2009, 5, 21, 21, 24, 8, tzinfo=<FixedOffset
>       "UTC" ...|
>
>       req
>
>               |<Request "GET u'/query'">|
>
>       self
>
>               |<trac.ticket.query.QueryModule object at 0x834078cc>|
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/ticket/query.py",
>       line *264*, in execute
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame4>
>
>
>
>             Code fragment:
>
>        259. | if not db:|
>
>        260. | db = self.env.get_db_cnx()|
>
>        261. | cursor = db.cursor()|
>
>        262. | |
>
>        263. | sql, args = self.get_sql(req, cached_ids)|
>
>        264. | self.num_items = self._count(sql, args, db)|
>
>        265. | |
>
>        266. | if self.num_items <= self.max:|
>
>        267. | self.has_more_pages = False|
>
>        268. | |
>
>        269. | if self.has_more_pages:|
>
>
>             Local variables:
>
>       Name
>
>               Value
>
>       args
>
>               |[u'testing', u'[email protected]
>       <mailto:u%[email protected]>']|
>
>       cached_ids
>
>               |None|
>
>       cursor
>
>               |<trac.db.util.IterableCursor object at 0x83ba32fc>|
>
>       db
>
>               |<trac.db.pool.PooledConnection object at 0x83aa2ecc>|
>
>       req
>
>               |<Request "GET u'/query'">|
>
>       self
>
>               |<trac.ticket.query.Query object at 0x83787c4c>|
>
>       sql
>
>               |u"SELECT t.id <http://t.id> AS id,t.summary AS summary,t.type
>       AS type,t.priority AS ...|
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/ticket/query.py",
>       line *249*, in _count
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame5>
>
>
>
>             Code fragment:
>
>        244. | # self.env.log.debug("Count results in Query SQL: " +
>             count_sql % |
>
>        245. | # tuple([repr(a) for a in args]))|
>
>        246. | |
>
>        247. | cnt = 0|
>
>        248. | try:|
>
>        249. | cursor.execute(count_sql, args);|
>
>        250. | except:|
>
>        251. | db.rollback()|
>
>        252. | raise|
>
>        253. | for cnt, in cursor:|
>
>        254. | break|
>
>
>             Local variables:
>
>       Name
>
>               Value
>
>       args
>
>               |[u'testing', u'[email protected]
>       <mailto:u%[email protected]>']|
>
>       cnt
>
>               |0|
>
>       count_sql
>
>               |u"SELECT COUNT(*) FROM (SELECT t.id <http://t.id> AS
>       id,t.summary AS summary,t.type AS ...|
>
>       cursor
>
>               |<trac.db.util.IterableCursor object at 0x83a1014c>|
>
>       db
>
>               |<trac.db.pool.PooledConnection object at 0x83aa2ecc>|
>
>       self
>
>               |<trac.ticket.query.Query object at 0x83787c4c>|
>
>       sql
>
>               |u"SELECT t.id <http://t.id> AS id,t.summary AS summary,t.type
>       AS type,t.priority AS ...|
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/db/util.py",
>       line *50*, in execute
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame6>
>
>
>
>             Code fragment:
>
>         45. | def execute(self, sql, args=None):|
>
>         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:|
>
>
>             Local variables:
>
>       Name
>
>               Value
>
>       args
>
>               |[u'testing', u'[email protected]
>       <mailto:u%[email protected]>']|
>
>       self
>
>               |<trac.db.util.IterableCursor object at 0x83a1014c>|
>
>       sql
>
>               |u"SELECT COUNT(*) FROM (SELECT t.id <http://t.id> AS
>       id,t.summary AS summary,t.type AS ...|
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/db/sqlite_backend.py",
>       line *58*, in execute
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame7>
>
>
>
>             Code fragment:
>
>         53. | raise|
>
>         54. | def execute(self, sql, args=None):|
>
>         55. | if args:|
>
>         56. | sql = sql % (('?',) * len(args))|
>
>         57. | return self._rollback_on_error(sqlite.Cursor.execute, sql,|
>
>         58. | args or [])|
>
>         59. | def executemany(self, sql, args=None):|
>
>         60. | if args:|
>
>         61. | sql = sql % (('?',) * len(args[0]))|
>
>         62. | return
>             self._rollback_on_error(sqlite.Cursor.executemany, sql,|
>
>         63. | args or [])|
>
>
>             Local variables:
>
>       Name
>
>               Value
>
>       args
>
>               |[u'testing', u'[email protected]
>       <mailto:u%[email protected]>']|
>
>       self
>
>               |<trac.db.sqlite_backend.PyFormatCursor object at 0x83ac21ec>|
>
>       sql
>
>               |u"SELECT COUNT(*) FROM (SELECT t.id <http://t.id> AS
>       id,t.summary AS summary,t.type AS ...|
>
>     * File
>       
> "/usr/lib/python2.5/site-packages/Trac-0.11.5stable_r8210-py2.5.egg/trac/db/sqlite_backend.py",
>       line *50*, in _rollback_on_error
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame8>
>       
> <http://75.101.188.24/trac/repos/query?status=testing&group=milestone&order=priority&report=22&col=id&col=summary&col=type&col=priority&col=component&owner=%21ilya.gelle%40ahamobile.com#frame8>
>
>
> I appreciate your help.
>

See http://trac.edgewall.org/ticket/8312

-- Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
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/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to