[GHC] #14874: Trac: TypeError: can't compare datetime.datetime to str

GHC ghc-devs at haskell.org
Thu Mar 1 23:16:11 UTC 2018


#14874: Trac: TypeError: can't compare datetime.datetime to str
-------------------------------------+-------------------------------------
           Reporter:  sjakobi        |             Owner:  hvr
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Trac & Git     |           Version:
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Other
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This problem appears when sorting closed tickets by their "modified"
 field.
 [https://ghc.haskell.org/trac/ghc/query?status=closed&col=id&col=changetime&desc=1&order=changetime
 Example]. The source of the problem appears to be that a few old tickets
 don't have a "modified" time (changetime). Instead their "changetime"
 field seems to be set to the empty string.

 Apparently similar issues have been known to the Trac developers for a
 while: https://trac.edgewall.org/ticket/12029.

 ==== How to Reproduce ====

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

 ''(please provide additional details here)''

 Request parameters:
 {{{
 {u'col': [u'id', u'changetime'],
  u'desc': u'1',
  u'order': u'changetime',
  u'page': u'2',
  u'status': u'closed'}
 }}}

 User agent: `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
 like Gecko) Ubuntu Chromium/64.0.3282.167 Chrome/64.0.3282.167
 Safari/537.36`

 ==== System Information ====
 ''System information not available''

 ==== Enabled Plugins ====
 ''Plugin information not available''

 ==== Interface Customization ====
 ''Interface customization information not available''

 ==== Python Traceback ====
 {{{
 Traceback (most recent call last):
   File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line
 623, in _dispatch_request
     dispatcher.dispatch(req)
   File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line
 239, in dispatch
     resp = chosen_handler.process_request(req)
   File "/usr/local/lib/python2.7/dist-packages/trac/ticket/query.py", line
 1000, in process_request
     return self.display_html(req, query)
   File "/usr/local/lib/python2.7/dist-packages/trac/ticket/query.py", line
 1117, in display_html
     data = query.template_data(context, tickets, orig_list, orig_time,
 req)
   File "/usr/local/lib/python2.7/dist-packages/trac/ticket/query.py", line
 776, in template_data
     elif ticket['changetime'] > orig_time:
 TypeError: can't compare datetime.datetime to str
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14874>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list