Modify

Opened 4 years ago

Closed 22 months ago

Last modified 22 months ago

#8374 closed defect (fixed)

list of index is out of range

Reported by: mark_kids@… Owned by: rjollos
Priority: high Component: TracMetrixPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by rjollos)

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 4 years ago by rjollos

  • Description modified (diff)

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.

comment:2 Changed 4 years ago by anonymous

Steps to reproduce.

  1. create a new milestone
  2. add an existing ticket to the milestone.
  3. 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 4 years ago by mark_kids@…

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 4 years ago by rjollos

  • Priority changed from normal to high
  • Status changed from new to assigned

Thanks for the detailed report. Investigating ...

comment:5 Changed 22 months ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to 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 22 months ago by rjollos

(In [12198]) Refs #8374: Refactored some code while debugging the issue in #8374.

Add Comment

Modify Ticket

Action
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'.
Author


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

 
Note: See TracTickets for help on using tickets.