Caught ValueError while rendering: day is out of range for month

Issue #3 resolved
programista
created an issue

I have error on line 667 of filters.py in method collapse_results: start_date = dt_template.replace(**dict({range_type.dateattr: start_val}))

start_val on error is 31 and dt_template is 2011-11-01 00:00:00, so out of range

Args passed to collapse_results in my case:

results list:

[[datetime.datetime(2011, 11, 1, 0, 0), 2L], [datetime.datetime(2011, 11, 2, 0, 0), 1L],

[datetime.datetime(2011, 11, 3, 0, 0), 1L], [datetime.datetime(2011, 11, 4, 0, 0), 1L],

[datetime.datetime(2011, 11, 5, 0, 0), 2L], [datetime.datetime(2011, 11, 6, 0, 0), 1L],

[datetime.datetime(2011, 11, 7, 0, 0), 2L], [datetime.datetime(2011, 11, 8, 0, 0), 1L],

[datetime.datetime(2011, 11, 9, 0, 0), 1L], [datetime.datetime(2011, 11, 10, 0, 0), 1L],

[datetime.datetime(2011, 11, 11, 0, 0), 1L], [datetime.datetime(2011, 11, 12, 0, 0), 1L],

[datetime.datetime(2011, 11, 15, 0, 0), 1L], [datetime.datetime(2011, 11, 16, 0, 0), 1L],

[datetime.datetime(2011, 11, 23, 0, 0), 1L], [datetime.datetime(2011, 11, 24, 0, 0), 1L]]

range_type is DateRangeType: <DateRange 3 single day>

Comments (7)

  1. Log in to comment