Modify

Opened 7 years ago

#12968 new defect

[PATCH]: UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' when viewing query page

Reported by: Cinc-th Owned by: matobaa
Priority: normal Component: SnapshotPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

Full error message:

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

Python Traceback

Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\main.py", line 562, in _dispatch_request
    dispatcher.dispatch(req)
  File "build\bdist.win32\egg\trac\web\main.py", line 269, in dispatch
    iterable=chrome.use_chunked_encoding)
  File "build\bdist.win32\egg\trac\web\chrome.py", line 1079, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "c:\users\u010899\appdata\local\temp\easy_install-rbpxdt\Genshi-0.7-py2.7-win32.egg.tmp\genshi\core.py", line 133, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "build\bdist.win32\egg\trac\web\chrome.py", line 1331, in inner
    data)
  File "build\bdist.win32\egg\snapshot\query.py", line 54, in filter_stream
    ' || '.join([self.formatter(ticket[col]) for col in cols]))
  File "build\bdist.win32\egg\snapshot\query.py", line 29, in formatter
    return isinstance(obj, datetime) and format_datetime(obj) or str(obj)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 1: ordinal not in range(128)

We have user names with umlauts and also column names with umlauts.

The attached patch fixes the problem.

Attachments (1)

unicode_decode_error.patch (2.8 KB) - added by Cinc-th 7 years ago.
Patch for UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' when viewing query page

Download all attachments as: .zip

Change History (1)

Changed 7 years ago by Cinc-th

Attachment: unicode_decode_error.patch added

Patch for UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' when viewing query page

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain matobaa.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.