Opened 8 years ago

Closed 7 years ago

Last modified 4 years ago

#5503 closed defect (fixed)

[PATCH] KeyError: 'fields'

Reported by: jens.rantil@… Owned by: coderanger
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


How to Reproduce

While doing a GET operation on /ticket/2191, Trac issued an internal error.

I wanted to see the diff of a ticket summary change (url=/ticket/2191?action=diff&version=1).

Request parameters:

{'action': u'diff', 'version': u'1', 'id': u'2191'}

System Information

Trac 0.11.1
Python 2.4.4 (#1, Oct 22 2008, 20:17:05)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]
setuptools 0.6c3
SQLite 3.3.8
pysqlite 2.3.2
Genshi 0.5.1
mod_python 3.2.10
Subversion 1.5.1 (r32289)

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/", line 423, in _dispatch_request
  File "/usr/lib/python2.4/site-packages/trac/web/", line 208, in dispatch
    template, data, content_type = \
  File "/usr/lib/python2.4/site-packages/trac/web/", line 299, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File "build/bdist.linux-x86_64/egg/mastertickets/", line 64, in post_process_request
KeyError: 'fields'

Attachments (1)

trac-hacks-5503-patch.diff (851 bytes) - added by boonekamp 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by seltmann@…

same here

Changed 7 years ago by boonekamp

comment:2 Changed 7 years ago by boonekamp

The issue was that when you enter diff mode, the structure of the 'changes' datafield was different (and did not contain the 'fields' sub).

This patch bails out investigating the changes datastructure if we are in diff mode.

comment:3 Changed 7 years ago by boonekamp

  • Summary changed from KeyError: 'fields' to [PATCH] KeyError: 'fields'

comment:4 Changed 7 years ago by Drops

+1 Have the same error with a ticket diff description. The patch fixed this. Thanks! I think the fix should be committed in to the svn.

comment:5 Changed 7 years ago by boonekamp

  • Resolution set to fixed
  • Status changed from new to closed

comment:6 Changed 4 years ago by rjollos

(In [12910]) Fix #5503, #6766 and #3920 with the patch from #3920:

[Patch] Error in code causing diff crash on tickets with changes in description only (

Add Comment

Modify Ticket

as closed The owner will remain coderanger.
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.