Opened 17 years ago
Closed 15 years ago
#4111 closed defect (worksforme)
IndexError: list index out of range error caused by TracHours
| Reported by: | Owned by: | Ryan J Ollos | |
|---|---|---|---|
| Priority: | high | Component: | TracHoursPlugin |
| Severity: | blocker | Keywords: | trachours |
| Cc: | Jeff Hammel | Trac Release: | 0.11 |
Description (last modified by )
If TracHours is installed on an existing Trac with tickets, it throws the following error:
Trac detected an internal error:
IndexError: list index out of range
Most recent call last:
* File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
Code fragment:
418. try:
419. if not env and env_error:
420. raise HTTPInternalError(env_error)
421. try:
422. dispatcher = RequestDispatcher(env)
423. dispatcher.dispatch(req)
424. except RequestDone:
425. pass
426. resp = req._response or []
427.
428. except HTTPException, e:
Local variables:
Name Value
after [u' except RequestDone:', u' pass', u' resp = ...
before [u' try:', u' if not env and env_error:', u' raise ...
dispatcher <trac.web.main.RequestDispatcher object at 0x9ffa90c>
e IndexError('list index out of range',)
env <trac.env.Environment object at 0x99f338c>
env_error None
exc_info (<type 'exceptions.IndexError'>, IndexError('list index out of range',), ...
filename '/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py'
frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...
has_admin True
line u' dispatcher.dispatch(req)'
lineno 422
message u'IndexError: list index out of range'
req <Request "GET u'/newticket'">
resp []
tb <traceback object at 0xa0227fc>
tb_hide None
traceback 'Traceback (most recent call last):\n File ...
* File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/main.py", line 219, in dispatch
Code fragment:
214. out = StringIO()
215. pprint(data, out)
216. req.send(out.getvalue(), 'text/plain')
217. else:
218. output = chrome.render_template(req, template,
219. data, content_type)
220. # Give the session a chance to persist changes
221. if req.session:
222. req.session.save()
223.
224. req.send(output, content_type or 'text/html')
Local variables:
Name Value
chosen_handler <trac.ticket.web_ui.TicketModule object at 0x9ffa72c>
chrome <trac.web.chrome.Chrome object at 0x9ffa12c>
content_type None
data {'dateinfo': <function dateinfo at 0x9ea9bc4>, 'valid': None, 'fields': ...
err (<type 'exceptions.IndexError'>, IndexError('list index out of range',), ...
handler <trac.ticket.web_ui.TicketModule object at 0x9ffa72c>
req <Request "GET u'/newticket'">
resp ('ticket.html', {'dateinfo': <function dateinfo at 0x9ea9bc4>, 'valid': ...
self <trac.web.main.RequestDispatcher object at 0x9ffa90c>
template 'ticket.html'
* File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 690, in render_template
Code fragment:
685.
686. stream = template.generate(**data)
687.
688. # Filter through ITemplateStreamFilter plugins
689. if self.stream_filters:
690. stream |= self._filter_stream(req, method, filename, stream, data)
691.
692. if fragment:
693. return stream
694.
695. if method == 'text':
Local variables:
Name Value
content_type 'text/html'
data {'abs_url_of': <function get_abs_url at 0x966a994>, 'all': <built-in ...
filename 'ticket.html'
fragment False
method 'xhtml'
req <Request "GET u'/newticket'">
self <trac.web.chrome.Chrome object at 0x9ffa12c>
stream <genshi.core.Stream object at 0x9f9490c>
template <MarkupTemplate "ticket.html">
* File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r895-py2.5-linux-i686.egg/genshi/core.py", line 128, in __or__
Local variables:
Name Value
function <function inner at 0x9f0117c>
self <genshi.core.Stream object at 0x9f9490c>
* File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/web/chrome.py", line 789, in inner
Code fragment:
784.
785. def _filter_stream(self, req, method, filename, stream, data):
786. def inner(stream, ctxt=None):
787. for filter in self.stream_filters:
788. stream = filter.filter_stream(req, method, filename, stream,
789. data)
790. return stream
791. return inner
792.
Local variables:
Name Value
ctxt None
data {'abs_url_of': <function get_abs_url at 0x966a994>, 'all': <built-in ...
filename 'ticket.html'
filter <trachours.hours.TracHoursPlugin object at 0x9ffa3ac>
method 'xhtml'
req <Request "GET u'/newticket'">
self <trac.web.chrome.Chrome object at 0x9ffa12c>
stream <genshi.core.Stream object at 0x9f9490c>
* File "/usr/lib/python2.5/site-packages/TracHoursPlugin-0.1-py2.5.egg/trachours/hours.py", line 235, in filter_stream
Code fragment:
230. 'roadmap.html': self.filter_roadmap,
231. }
232.
233. handler = handlers.get(filename)
234. if handler is not None:
235. stream = handler(req, stream, data)
236.
237. return stream
238.
239.
240. ###### internal methods
Local variables:
Name Value
data {'abs_url_of': <function get_abs_url at 0x966a994>, 'all': <built-in ...
filename 'ticket.html'
handler <bound method TracHoursPlugin.filter_ticket of ...
handlers {'roadmap.html': <bound method TracHoursPlugin.filter_roadmap of ...
method 'xhtml'
req <Request "GET u'/newticket'">
self <trachours.hours.TracHoursPlugin object at 0x9ffa3ac>
stream <genshi.core.Stream object at 0x9f9490c>
* File "/usr/lib/python2.5/site-packages/TracHoursPlugin-0.1-py2.5.egg/trachours/hours.py", line 995, in filter_ticket
Attachments (0)
Change History (7)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
I am not sure why this ticket is on the TimingAndEstimationPlugin, since it seems to be related to the TracHoursPlugin, but I fixed an error that may or may not have anything to do with this. Please reopen this ticket at http://trac.openplans.org/hours/newticket
Thanks,
Russ
comment:3 Changed 16 years ago by
| Component: | TimingAndEstimationPlugin → TracHoursPlugin |
|---|---|
| Resolution: | fixed |
| Status: | closed → reopened |
| Trac Release: | 0.10 → 0.11 |
comment:5 Changed 16 years ago by
actually it helped me to add the following to ticket-custom in trac.ini:
[ticket-custom] estimatedhours = text estimatedhours.label = Estimated Hours estimatedhours.value = 0 totalhours = text totalhours.label = Total Hours totalhours.value = 0
comment:6 Changed 15 years ago by
| Description: | modified (diff) |
|---|---|
| Owner: | changed from novalis to Ryan J Ollos |
| Status: | reopened → new |
Can't reproduce with the TracHoursPlugin and the code is completely different now so its unlikely this is valid. Please open a new ticket if you have a similar issue.
comment:7 Changed 15 years ago by
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |



(In [4874]) re #4141 re #4111
fixed stack overflow that was caused by a change in how INavigationProvider worked. This is now using genshi filters which should allow it to work a bit better (aka no stack overflow)