Opened 6 years ago

Closed 6 years ago

#10047 closed enhancement (fixed)

TypeError: can't compare datetime.datetime to

Reported by: anonymous12 Owned by: Ryan J Ollos
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 6 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.