Modify

Opened 7 years ago

Closed 7 years ago

#2542 closed defect (fixed)

Problem with report_activity when date is 2007/31/12

Reported by: ttressieres Owned by: dagomez
Priority: normal Component: StractisticsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

when i want to see statistics i've got this error

2008-02-08 09:31:05,650 Trac[main] ERROR: '07/53'
Traceback (most recent call last):

File "D:\Dev\Python24\lib\site-packages\trac\web\main.py", line 406, in dispatch_request

dispatcher.dispatch(req)

File "D:\Dev\Python24\lib\site-packages\trac\web\main.py", line 237, in dispatch

resp = chosen_handler.process_request(req)

File "d:\travail\statisticsplugin\0.10\tags\0.1.0beta\stractistics\stractistics.py", line 84, in process_request

query_response = self._repository_activity(req.args)

File "d:\travail\statisticsplugin\0.10\tags\0.1.0beta\stractistics\stractistics.py", line 118, in _repository_activity

weeks_labels, authors_data = self._authors_commit_data(authors, revisions, start_date, end_date)

File "d:\travail\statisticsplugin\0.10\tags\0.1.0beta\stractistics\stractistics.py", line 225, in _authors_commit_data

authors_data[author][week] = authors_data[author][week] + 1

KeyError: '07/53'

To remove it, i've modified _weeks_elapsed methods

 - diff = datetime.timedelta(days=6)
 + diff = datetime.timedelta(days=1)

Attachments (1)

stratistics.patch (487 bytes) - added by ttressieres 7 years ago.
patch to remove error with week '07/53'

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by ttressieres

patch to remove error with week '07/53'

comment:1 Changed 7 years ago by dagomez

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

Fixed in 0.1.0
Thanks to everyone who has spotted the bug.

Add Comment

Modify Ticket

Action
as 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.