Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#7935 closed defect (fixed)

UnicodeEncodeError: 'ascii' codec can't encode character u'\uac00' in position 3: ordinal not in range(128)

Reported by: avy@… Owned by: Christian Boos
Priority: normal Milestone: 0.11.3
Component: ticket system Version: 0.12dev
Severity: normal Keywords: unicode
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

어떻게 재현할 것인가?

While doing a POST operation on /newticket, Trac에서 내부적인 에러가 발생했습니다.

ticket등록 시 UnicodeEncodeError 라는 에러 발생

요청 파라메터:

{'__FORM_TOKEN': u'6fb0960caab070deeec1b0c3',
 'field_cc': u'',
 'field_component': u'Log Parser',
 'field_description': u'sadf',
 'field_keywords': u'',
 'field_milestone': u'\uc5c6\uc74c',
 'field_owner': u'',
 'field_priority': u'major',
 'field_reporter': u'tgcarrot',
 'field_status': u'new',
 'field_summary': u'test',
 'field_type': u'defect',
 'field_version': u'',
 'submit': u'Create ticket'}

시스템 정보

Trac 0.12dev
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
setuptools 0.6c9
SQLite 3.5.2
pysqlite 2.4.1
Genshi 0.6dev-r988
Babel 1.0dev-r466
mod_python 3.3.1
Pygments 1.0
Subversion 1.5.5 (r34862)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "c:\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\web\main.py", line 457, in _dispatch_request
    dispatcher.dispatch(req)
  File "c:\python25\lib\site-packages\Trac-0.12dev-py2.5.egg\trac\web\main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "C:\Python25\lib\site-packages\trac-0.12dev-py2.5.egg\trac\ticket\web_ui.py", line 190, in process_request
    return self._process_newticket_request(req)
  File "C:\Python25\lib\site-packages\trac-0.12dev-py2.5.egg\trac\ticket\web_ui.py", line 402, in _process_newticket_request
    self._do_create(req, ticket) # (redirected if successful)
  File "C:\Python25\lib\site-packages\trac-0.12dev-py2.5.egg\trac\ticket\web_ui.py", line 1001, in _do_create
    "ticket #%s: %s" % (ticket.id, e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\uac00' in position 3: ordinal not in range(128)

Attachments (1)

t7935-log-exception-unicode-r7778.diff (2.7 KB ) - added by Christian Boos 15 years ago.
unicode safe error reporting for ticket notification errors

Download all attachments as: .zip

Change History (6)

comment:1 by Christian Boos, 15 years ago

Component: admin/webticket system
Keywords: unicode added
Milestone: 0.11.3
Owner: set to Christian Boos

You could check the following patch and see if it works for you (i.e. you should get to see the actual error message triggered during notification, probably a misconfiguration of some sort, see TracNotification for troubleshooting).

by Christian Boos, 15 years ago

unicode safe error reporting for ticket notification errors

comment:2 by anonymous, 15 years ago

thank you cboos. but I still have same problem with create ticket..

comment:3 by Christian Boos, 15 years ago

Well, yes the patch is not finished. In the meantime, you can probably see the actual error (notification issue?) in the Trac log (see TracLogging for details).

comment:4 by Christian Boos, 15 years ago

Milestone: 0.11.40.11.3

comment:5 by Christian Boos, 15 years ago

Resolution: fixed
Status: newclosed

With r7834, logging exceptions should now be more robust when dealing with non-ascii messages.

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.