Modify ↓
#8374 closed defect (fixed)
list of index is out of range
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | high | Component: | TracMetrixPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
Code fragment: Line 235 236 #get index of day in the dates list 237 index = bisect(dates, date2num(date)) - 1 238 239 for key in tkt_counts: 240 tkt_counts[key][index] = tkt_counts[key][index] + len(event[1][key]) 241 242 return tkt_counts 243 244 245 Local variables: Name Value date datetime.datetime(2011, 1, 6, 22, 3, 48, 531988, tzinfo=<LocalTimezone ... dates array([], dtype=float64) env <trac.env.Environment object at 0x2aaab5ff5090> event (1294380228531988L, {'Leave': set([]), 'Finish': set([]), 'Enter': ... index -1 key 'Leave' sorted_events [(1294380228531988L, {'Leave': set([]), 'Finish': set([]), 'Enter': ... tkt_counts {'Leave': [], 'Finish': [], 'Enter': []}
Attachments (0)
Change History (6)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 14 years ago by
Steps to reproduce.
- create a new milestone
- add an existing ticket to the milestone.
- click on the tracmetrix link for the milestone.
System Information:
Trac 0.12 mod_wsgi Python 2.6.5 pysqlite 2.4.1 sqlite 3.3.6
comment:3 Changed 14 years ago by
I've also test this on a new trac environment with the default milestones. I've only created one ticket and assigned it to one of the default milestones. The tracmetrix mdashboard give the same error.
The index variable is -1. I supposed this is what's causing the error.
comment:4 Changed 14 years ago by
Priority: | normal → high |
---|---|
Status: | new → assigned |
Thanks for the detailed report. Investigating ...
comment:5 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This issue should be fixed on the trunk now. I believe it was caused by mixing non-naive datetimes with utc datetimes. I'll commit a quick bit of code cleanup now. Please reopen if you can reproduce the issue with the latest trunk code.
comment:6 Changed 12 years ago by
Note: See
TracTickets for help on using
tickets.
There is nothing I can do with this without additional information, such as info about your Trac setup and what you were doing at the time the error occurred.