Edgewall Software

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#7679 closed defect (fixed)

KeyError: u'name' when creating a ticket

Reported by: jug@… Owned by: Christian Boos
Priority: high Milestone: 0.12
Component: i18n Version: 0.12dev
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


How to Reproduce

I just upgraded to 0.12 to get babel-support. While doing a GET operation on /ticket/3 (creating a ticket), Trac issued an internal error.

Request parameters:

{'id': u'3'}

User Agent was: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3

System Information

Trac 0.12dev-r7557
Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
setuptools 0.6c8
SQLite 3.4.2
pysqlite 2.4.0
Genshi 0.6dev-r960
Pygments 0.8.1
Subversion 1.4.6 (r28521)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/home/julian/site-packages/Trac-0.12dev_r7557-py2.5.egg/trac/web/main.py", line 456, in _dispatch_request
  File "/home/julian/site-packages/Trac-0.12dev_r7557-py2.5.egg/trac/web/main.py", line 213, in dispatch
    resp = chosen_handler.process_request(req)
  File "/home/julian/site-packages/Trac-0.12dev_r7557-py2.5.egg/trac/ticket/web_ui.py", line 178, in process_request
    return self._process_ticket_request(req)
  File "/home/julian/site-packages/Trac-0.12dev_r7557-py2.5.egg/trac/ticket/web_ui.py", line 526, in _process_ticket_request
    get_reporter_id(req, 'author'), field_changes)
  File "/home/julian/site-packages/Trac-0.12dev_r7557-py2.5.egg/trac/ticket/web_ui.py", line 1239, in _insert_ticket_data
    req, ticket, action)
  File "/home/julian/site-packages/Trac-0.12dev_r7557-py2.5.egg/trac/ticket/default_workflow.py", line 244, in render_ticket_action_control
  File "/home/julian/site-packages/Trac-0.12dev_r7557-py2.5.egg/trac/util/translation.py", line 68, in gettext
    return _gettext()
  File "/home/julian/site-packages/Trac-0.12dev_r7557-py2.5.egg/trac/util/translation.py", line 65, in _gettext
    return kwargs and trans % kwargs or trans
KeyError: u'name'

Attachments (0)

Change History (9)

comment:1 by Remy Blank, 14 years ago

Milestone: 0.12

The function render_ticket_action_control() has been changed lately, and the translations have not yet been updated accordingly. In this case, the string at line 243 was "The owner will change to %(name)s" and has been changed to "The owner will change from %(current_owner)s to %(selected_owner)s".

comment:2 by anonymous, 13 years ago

Resolution: fixed
Status: newclosed

comment:3 by anonymous, 13 years ago

Resolution: fixed
Status: closedreopened

comment:4 by anonymous, 13 years ago

any updated files provided?

comment:5 by Christian Boos, 13 years ago

Please, no need to close/reopen a bug before making an update, it's just annoying for us.

Until the translation files get fixed, the workaround here is to disable Babel.

Besides, we should also be robust against such errors.

comment:6 by anonymous, 13 years ago

good job,guys

comment:7 by anonymous, 13 years ago

Before release trac of new version,it's important having more tests. It's easy to find some bugs. Anyway thank all of u. u do fantastic job,and I like to use this software.

in reply to:  5 comment:8 by Christian Boos, 13 years ago

Resolution: fixed
Severity: majornormal
Status: reopenedclosed

Replying to cboos:

Besides, we should also be robust against such errors.

Done in r8095.

comment:9 by Christian Boos, 13 years ago

Owner: set to Christian Boos

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.