Opened 5 years ago

Closed 5 years ago

# IndexError: list index out of range (with solution)

Reported by: Owned by: alvaro@… falkb low SimpleMultiProjectPlugin normal 0.12

## The Problem

Before installing the plugin I could get to my trac (v0.12.5) page on http://example.com/trac, but after installing it I couldn't and it throws an IndexError: list index out of range. Funny thing, I could still get to the page using http://example.com/trac/ (note the final slash).

## The Cause

Taking a look on the traceback I found what was cousing the error: in some files there is a condition checking if the URL matches roadmap or timeline but it asumes that the URL has at least one slash (/) after the base dir. When it isn't (like in http://example.com/trac) the index is out of range.

## The Solution

In order to fix this you should modify the condition and test first if that index exist (using len(path_elms) > 1). This should be added to the following lines:

Hope this helps. Best regards!

Alvaro Flaño

### comment:1 Changed 5 years ago by falkb

Resolution: → fixed new → closed

In 15338:

closes #12628: "IndexError: list out of range" fixed by Alvaro Flano. Thanks!

### Modify Ticket

Change Properties