Opened 2 years ago

Closed 2 years ago

#10047 closed enhancement (fixed)

TypeError: can't compare datetime.datetime to

Reported by: anonymous12 Owned by: rjollos
Priority: normal Component: TracMetrixPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


There's an error in
Line 442 must be

begin_date = to_datetime(min_time).date()

instead of

begin_date = to_datetime(min_time)

Otherwise I get the error

TypeError: can't compare datetime.datetime to

when clicking any milestone in the Metrics Milestone Summary.

Log entry:

2012-05-22 14:39:46,821 Trac[main] ERROR: Internal Server Error: 
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\trac\web\", line 522, in _dispatch_request
  File "C:\Python27\lib\site-packages\trac\web\", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\bdist.win32\egg\tracmetrixplugin\", line 355, in process_request
    return self._render_view(req, db, milestone)
  File "build\bdist.win32\egg\tracmetrixplugin\", line 450, in _render_view
    numdates = drange(begin_date, end_date + timedelta(days=1), timedelta(days=1))
  File "C:\Python27\lib\site-packages\matplotlib\", line 305, in drange
    if dinterval_end >= dend:               #ensure, that an half open interval will be generated [dstart, dend)
TypeError: can't compare datetime.datetime to


Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by rjollos

  • Resolution set to fixed
  • Status changed from new to closed

(In [11671]) Fixes #10047: Datetime and Date objects were being compared.

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.