Edgewall Software
Modify

Opened 13 years ago

Closed 13 years ago

#10230 closed defect (cantfix)

Trac detected an internal error: KeyError: 3

Reported by: kenorb@… Owned by:
Priority: normal Milestone:
Component: ticket system Version: 0.12-stable
Severity: normal Keywords: comment
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I've edited comment and when clicked on: (previous) it's throwing the error. "Last edited 18 minutes ago by kenorb (previous) (diff)" URL of that error: https://mytrac/projects/datagov/ticket/781?cversion=3&cnum_hist=5#comment:5 The second issue is that after comment 45 it starting to count it from comment 3, so there are some comment duplicates. If I edit the last one, I'm editing on of the first.

Python Traceback

Most recent call last: File "/var/www/trac/public_html/.egg-cache/Trac-0.12-py2.5.egg-tmp/trac/ticket/templates/ticket_change.html", line 59, in <Expression u'wiki_to_html(context, change.comment_history[int(cversion)].comment,\n escape_newlines=preserve_newlines)'>

System Information:

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_4) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.24 Safari/535.1

Trac 0.12 Genshi 0.6 mod_python 3.3.1 Pygments 0.10 pysqlite 2.4.1 Python 2.5.2 (r252:60911, Jan 24 2010, 15:24:24) [GCC 4.3.2] pytz 2008c setuptools 0.6c12 SQLite 3.5.9 Subversion 1.5.1 (r32289) jQuery 1.4.2 Enabled Plugins:

TracTags 0.6 /usr/lib/python2.5/site-packages/TracTags-0.6-py2.5.egg TracTicketChangesets 1.0dev-r9996 /usr/lib/python2.5/site-packages/TracTicketChangesets-1.0dev_r9996-py2.5.egg

Attachments (0)

Change History (7)

in reply to:  description comment:1 by Remy Blank, 13 years ago

Replying to kenorb@…:

I've edited comment and when clicked on: (previous) it's throwing the error.

It looks like version 3 of the comment is missing from the database, or…

The second issue is that after comment 45 it starting to count it from comment 3, so there are some comment duplicates. If I edit the last one, I'm editing on of the first.

… or it's trying to find version 3 of the wrong comment. The bad comment numbering is a known issue. We have a fix on trunk that should solve the KeyError you experience when displaying the comment history, but the numbering issue is unsolved.

comment:2 by kenorb@…, 13 years ago

Version 3 is not missing, because diff does work. URL: /projects/datagov/ticket/781?action=comment-diff&cnum=5&version=4 http://img862.imageshack.us/img862/1919/screenshot20110623at144.png

comment:3 by anonymous, 13 years ago

URL: /projects/datagov/ticket/781?action=comment-history&cnum=5 http://img802.imageshack.us/img802/5095/screenshot20110623at145.png When I do diff to any version, it's showing the difference. When I click '0', it's going to the correct page. /projects/datagov/ticket/781?cversion=0&cnum_hist=5#comment:5 When I click '1', '2', '3', '4', it's showing the error.

comment:4 by anonymous, 13 years ago

Code fragment:

58	    <div py:otherwise="" py:choose="" class="comment searchable" xml:space="preserve">
59	      <py:when test="show_history">${wiki_to_html(context, change.comment_history[int(cversion)].comment,
60	                                                  escape_newlines=preserve_newlines)}</py:when>

comment:5 by Remy Blank, 13 years ago

Thanks for the additional info. So we're trying to show diffs for the wrong comment. Do you have the possibility to upgrade to current trunk to see if the fix there corrects the symptom? Maybe in a test environment created as a clone of your current environment?

comment:6 by anonymous, 13 years ago

No, I can't. Unfortunately I'm working on that environment only to the end of this week.

comment:7 by Christian Boos, 13 years ago

Component: generalticket system
Keywords: comment added; KeyError removed
Resolution: cantfix
Status: newclosed

Suggesting an upgrade to a later version … (0.12.3 will be out soon ;-) ).

That's about all we can do without more precise problem reproduction steps. Typically the problem that would require on-site debugging ;-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.