Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#2903 closed defect (fixed)

UnicodeEncodeError: 'ascii' codec can't encode character u'\\xe8' in position 15

Reported by: Alec Thomas Owned by: Christopher Lenz
Priority: normal Milestone: 0.10
Component: general Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christopher Lenz)

I'm getting this traceback in my Apache logs every now and then:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
    result = object(req)
  File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 86, in handler
    gateway.run(dispatch_request)
  File "/usr/lib/python2.4/site-packages/trac/web/wsgi.py", line 87, in run
    response = application(self.environ, self._start_response)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 320, in dispatch_request
    req.send_error(sys.exc_info(), status=500)
  File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 352, in send_error
    exc_info)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 283, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 170, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/tractags/web_ui.py", line 59, in process_request
  File "/usr/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 116, in process_request
    req.write(page.text)
  File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 405, in write
    self._write(data)
  File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 78, in _write
    self.req.write(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\\xe8' in position 15: ordinal not in range(128)

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 16 years ago

0.10dev after the unicode branch has been merged? (i.e. ≥ r3024)

If not, can you try to upgrade?

comment:2 by Alec Thomas, 16 years ago

Yep, pretty sure it was after the unicode merge. I did another update this afternoon, will update the ticket if I see it again.

comment:3 by Alec Thomas, 16 years ago

Description: modified (diff)

I'd have a look myself, but I know exactly zip about character encoding and don't have the time to learn it at the moment :(

comment:4 by Christopher Lenz, 16 years ago

Description: modified (diff)

Cleaning up the traceback…

comment:5 by Christopher Lenz, 16 years ago

Component: mod_python frontendwiki
Milestone: 0.10
Status: newassigned

This is about requests for the plain text view of wiki pages. Trac tries to write unicode data to the response, which then gets encoded to ASCII (instead of UTF-8).

Probably similar problems elsewhere where we use req.write().

comment:6 by Christopher Lenz, 16 years ago

Component: wikigeneral
Resolution: fixed
Status: assignedclosed

Fixed in [3029].

Modify Ticket

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