Opened 9 years ago

Closed 8 years ago

#3365 closed defect (fixed)

IndexError: list index out of range peerReviewView.html

Reported by: ron@… Owned by: proofek
Priority: normal Component: PeerReviewPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by proofek)

Error: IndexError: list index out of range

When user searches for code reviews or views any that aren't theirs the Index error appears when they choose one of the reviews that appears. There error happens on for example.

Quick Fix: edit the html in /tmp/.pythoneggs/ and in the templates and on the peerReviewView.html Edit the following to look like example beneath it:

<tr py:if="filesLength > 0" py:for="item in rvs" class="${}">

<td>${item[0]}</td> <td>${item[1]}</td>


<tr py:if="filesLength > 0" py:for="item in rvs" class="${}">



The problem is if you restart trac this change is not there.


File "/tmp/.python-eggs/TracCodeReview-2.1_toddlerdev_r0-py2.4.egg-tmp/codereview/templates/peerReviewView.html", line 93, in <Expression u'item[1]'>


System Info:

System Information:

User Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080702 Fedora/ Firefox/ Trac: 0.11 Python: 2.4.3 (#1, May 24 2008, 13:47:28) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] setuptools: 0.6c8 SQLite: 3.3.6 pysqlite: 1.1.7 Genshi: 0.5 mod_python: 3.2.8 Pygments: 0.10 jQuery: 1.2.3

Attachments (0)

Change History (6)

comment:1 Changed 9 years ago by ron@…

  • Trac Release changed from 0.10 to 0.11

Quick edit: Trac version

comment:2 Changed 8 years ago by Nate

We are also getting this error, and it's pretty much a showstopper for us, as peer review was the thing that attracted us to Trac.

comment:3 Changed 8 years ago by Nate

Okay, I fixed this in our local install. There are a few bugs in (at least in the 2.1toddler version we're on):

  1. There is a numeric flag in datamanager? that is being compared to a string RESULT: code review managers don't get recognized as such
  1. When the viewing user is neither the code review author nor a manager, only one item is placed in the newrvpair array. When later checked at PierReviewView.html:93, the code displays contents of newrvpair[1] without checking whether it actually exists RESULT: the IndexError described in this issue.

comment:4 Changed 8 years ago by NateClark

Nate again - I just registered as an actual user. Presumably that will allow you to contact me if desired. If not, here: nate.clark at_symbol brulant dot_symbol com

comment:5 Changed 8 years ago by anonymous

I had the same problem, I then changed the line causing the problem to the following and reinstalled the plugin.

<td py:if="len(item) >= 2">${item[1]}</td>

comment:6 Changed 8 years ago by proofek

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed

Fixed on 2.2-dev branch

Add Comment

Modify Ticket

as closed The owner will remain proofek.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.