#7080 closed defect (duplicate)
TypeError: can't compare datetime.datetime to int
Reported by: | dx | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 0.11b2 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to Reproduce
While doing a GET operation on /query
, Trac issued an internal error.
Queried for duplicates, removed some with trac-admin, refreshed the page, and got this. It looks like it fails comparing the ticket changes, because if I open that url in a different tab right now, it works fine.
(note: our users literally spammed us with duplicates, since we were getting 500 internal server error on POST. The reason for that is #6986, we have applied that locally and works like a charm)
Request parameters:
{'status': u'closed', 'col': [u'id', u'summary', u'priority'], 'resolution': [u'invalid', u'duplicate'], 'order': u'priority', 'milestone': u'1.1'}
User Agent was: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4) Gecko/2008031011 Minefield/3.0b4
System Information
Trac | 0.11b2
|
Python | 2.3.5 (#2, Oct 16 2006, 19:19:48) [GCC 3.3.5 (Debian 1:3.3.5-13)]
|
setuptools | 0.6c7
|
MySQL | server: "5.0.24a-standard-log", client: "5.0.16", thread-safe: 1
|
MySQLdb | 1.2.1_p2
|
Genshi | 0.4.4
|
jQuery: | 1.2.3
|
Python Traceback
Traceback (most recent call last): File "/home/dx/packages/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/web/main.py", line 419, in _dispatch_request dispatcher.dispatch(req) File "/home/dx/packages/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/web/main.py", line 196, in dispatch resp = chosen_handler.process_request(req) File "/home/dx/packages/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/ticket/query.py", line 659, in process_request return self.display_html(req, query) File "/home/dx/packages/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/ticket/query.py", line 741, in display_html data = query.template_data(context, tickets, orig_list, orig_time) File "/home/dx/packages/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/ticket/query.py", line 524, in template_data if ticket['time'] > orig_time: TypeError: can't compare datetime.datetime to int
Attachments (0)
Change History (4)
comment:1 by , 17 years ago
follow-up: 3 comment:2 by , 17 years ago
The primary issue here is a duplicate of #6088, which is fixed in latest trunk.
Now, you could eventually elaborate on those "500 internal server error on POST" which you attribute to the patch on #6986. If you're sure about the relation, please describe that problem in more details directly on #6986, otherwise here.
You're also right about the t.e.o issue, I'll fix that - but I don't think this was the reason of the "Bad Request" error (no idea about that one).
comment:3 by , 17 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Replying to cboos:
The primary issue here is a duplicate of #6088, which is fixed in latest trunk.
Now, you could eventually elaborate on those "500 internal server error on POST" which you attribute to the patch on #6986. If you're sure about the relation, please describe that problem in more details directly on #6986, otherwise here.
In #6986, here it's offtopic.
I let this ticket rest in peace, then
You're also right about the t.e.o issue, I'll fix that - but I don't think this was the reason of the "Bad Request" error (no idea about that one).
I think that it happens always when posting tickets built by that "create" button in trac tracebacks.
comment:4 by , 14 years ago
I have the same problem (comparing an int to a datetime.datetime field). How did you manage to solve yours ?
Also, when posting this ticket it complained about bad request, missing or invalid token. The url is the following (note the double )
I changed it to
t.e.o/newticket?
and it worked fine. But maybe it's just that it created a session, or something.