#7679 closed defect (fixed)
KeyError: u'name' when creating a ticket
| Reported by: | 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: | |||
Description
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:1.9.0.3) 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
dispatcher.dispatch(req)
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
current_owner=current_owner))
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 , 17 years ago
| Milestone: | → 0.12 |
|---|
comment:2 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 17 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
follow-up: 8 comment:5 by , 17 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:7 by , 17 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.
comment:8 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Severity: | major → normal |
| Status: | reopened → closed |
comment:9 by , 17 years ago
| Owner: | set to |
|---|



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".