Edgewall Software

Ticket #6352 (closed defect: duplicate)

Opened 14 months ago

Last modified 12 months ago

UnicodeDecodeError: 'ascii' codec can't decode byte 0xeb in position 0: ordinal not in range(128)

Reported by: fly1004@… Owned by: cmlenz
Priority: normal Milestone:
Component: admin/web Version: devel
Severity: normal Keywords: unicode needinfo
Cc: fly1004@…

Description

How to Reproduce

While doing a POST operation on /admin/ticket/type, Trac issued an internal error.

I changed the ticket type name from "defect" to "문제점"(korean characters) in the admin tab. and then I apply the default ticket type to "문제점".

Request parameters:

{'__FORM_TOKEN': u'0b08e91046e2399a50f575e1',
 'apply': u'Apply changes',
 'cat_id': u'ticket',
 'default': u'\ubb38\uc81c\uc810',
 'panel_id': u'type',
 'path_info': None,
 'value_1': u'1',
 'value_2': u'2',
 'value_3': u'3'}

System Information

Trac 0.11dev
Python 2.4.3 (#1, Aug 8 2006, 21:04:55)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)]
setuptools 0.6c7
SQLite 3.3.3
pysqlite 2.3.2
Genshi 0.4.4
Pygments None
Subversion 1.4.4 (r25188)

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11dev-py2.4.egg/trac/web/main.py", line 386, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11dev-py2.4.egg/trac/web/main.py", line 195, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11dev-py2.4.egg/trac/admin/web_ui.py", line 108, in process_request
    path_info)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11dev-py2.4.egg/trac/ticket/admin.py", line 41, in render_admin_panel
    return self._render_admin_panel(req, cat, page, version)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11dev-py2.4.egg/trac/ticket/admin.py", line 336, in _render_admin_panel
    self.config.save()
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11dev-py2.4.egg/trac/config.py", line 154, in save
    if current is not False and current != default:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xeb in position 0: ordinal not in range(128)

Attachments

Change History

  Changed 14 months ago by anonymous

  • cc fly1004@… added

  Changed 14 months ago by cboos

  • keywords needinfo added
  • milestone changed from 0.11 to 0.11.1

Which 0.11dev? Which browser and which server platform?

Setting a new ticket type of "문제점" as the default one works fine for me using latest trunk (Firefox 2.0 + tracd, both on Windows).

  Changed 14 months ago by fly1004@…

Thanks for your fast reply.

I used

  • Trac-0.11dev-r6153 trunk version.
  • Firefox 2.0.0.9, and mod_python and apache for trac server.

  Changed 14 months ago by cboos

Windows or not?

  Changed 14 months ago by ThurnerRupert

just in case ... did you set "main_interpreter" like suggested in TracModPython?

follow-up: ↓ 8   Changed 14 months ago by fly1004@…

  • Client is Windows and Trac server is linux(FedoraCore5).
  • Yes I setted "main_interpreter".
    SetHandler mod_python
    PythonInterpreter main_interpreter
    PythonHandler trac.web.modpython_frontend
    PythonOption TracEnv /home/Trac/MyEnv
    PythonOption TracLocale "ko_KR.utf8"
    SetEnv PYTHON_EGG_CACHE /home/Trac/MyEnv
    

When setting the ticket type name to korean character, There is no problem.

I think that the problem occurs when writing the korean character to the trac.ini file.

  Changed 14 months ago by fly1004@…

In admin tab, When I change the name to korean character and set the default value.

Ticket System Changing the name Setting the default
Components Ok Ok
Milestones Ok Ok
Priorities Ok Failed
Resolutions Ok Ok
Severities Ok Ok
Ticket Types Ok Failed
Version (Unknown date format error) (#2182)

in reply to: ↑ 6   Changed 12 months ago by cboos

  • status changed from new to closed
  • resolution set to duplicate
  • milestone 0.11.1 deleted

Replying to fly1004@gmail.com:

I think that the problem occurs when writing the korean character to the trac.ini file.

You were right. The same problem was reported again (#6535) and that time it got fixed ;-)

Add/Change #6352 (UnicodeDecodeError: 'ascii' codec can't decode byte 0xeb in position 0: ordinal not in range(128))

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cmlenz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.