Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#12628 closed defect (fixed)

IndexError: list index out of range (with solution)

Reported by: alvaro@… Owned by: falkb
Priority: low Component: SimpleMultiProjectPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

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

http://www.hosting.cl

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by falkb

Resolution: fixed
Status: newclosed

In 15338:

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain falkb.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.