Modify ↓
Opened 17 years ago
Closed 16 years ago
#2674 closed defect (fixed)
IndexError: list index out of range
Reported by: | Owned by: | Emmanuel Blot | |
---|---|---|---|
Priority: | normal | Component: | RevtreePlugin |
Severity: | major | Keywords: | |
Cc: | nulleke76@… | Trac Release: | 0.11 |
Description
Using the revtree plugin on the latest trac svn, it gives the following error (when logged on on the base url, without /wiki):
Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6631-py2.5.egg/trac/web/main.py", line 232, in dispatch self._post_process_request(req) File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6631-py2.5.egg/trac/web/main.py", line 297, in _post_process_request resp = f.post_process_request(req, *(None,)*arity) File "build/bdist.linux-i686/egg/revtree/web_ui.py", line 158, in post_process_request if (url_parts > 1) and (url_parts[1] in self.contexts): IndexError: list index out of range
this is caused in:
url_parts = req.path_info.split(u'/') if (url_parts > 1) and (url_parts[1] in self.contexts):
Attachments (0)
Change History (4)
comment:1 Changed 17 years ago by
comment:2 Changed 16 years ago by
comment:3 Changed 16 years ago by
I have solved the problem in my Trac installation:
In the line 158:
- if (url_parts > 1) and (url_parts[1] in self.contexts): IndexError: list index out of range
"url_parts > 1" is wrong, must be "len(url_parts)"
- with the next lines works fine:
def post_process_request(self, req, template, data, content_type):
if req.perm.has_permission('REVTREE_VIEW'):
url_parts = req.path_info.split(u'/') if (len(url_parts) > 1):
if (url_parts[1] in self.contexts):
add_ctxtnav(req, 'Revtree', href=req.href.revtree())
return (template, data, content_type)
comment:4 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I see the same problem. Only when accessing root URI.