Mailing List Archive

UnicodeEncodeError when trying to see Ticket
Hello.

I noticed today that 99% of my tickets are failing to the error message
below.

2020-10-06 10:38:34,229 Trac[main] ERROR: [172.18.0.3] Internal Server
Error: <RequestWithSession "GET '/ticket/11397'">, referrer '
http://url/proj/ '

Traceback (most recent call last):

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 647, in
_dispatch_request

dispatcher.dispatch(req)

File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 268, in
dispatch

iterable=chrome.use_chunked_encoding)

File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 1134, in
render_template

stream |= self._filter_stream(req, method, filename, stream, data)

File
"/usr/lib/python2.7/site-packages/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py",
line 133, in __or__

return Stream(_ensure(function(self)), serializer=self.serializer)

File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 1447, in
inner

data)

File "build/bdist.linux-x86_64/egg/ticketdep/web_ui.py", line 137, in
filter_stream

return self._filter_ticket_stream(req, method, filename, stream, data)

File "build/bdist.linux-x86_64/egg/ticketdep/web_ui.py", line 210, in
_filter_ticket_stream

parser = XMLParser(StringIO(dep_str))

File "/usr/lib64/python2.7/StringIO.py", line 57, in __init__

buf = str(buf)

File
"/usr/lib/python2.7/site-packages/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/builder.py",
line 107, in __str__

return str(self.generate())

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


So if I try and open one ticket, I get that error message. I'm running it
via tracd and clients can connect via ReverseProxy which is hosted on
Docker container with nginx running. I'm running version 1.2.6

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4fa1e94b-af27-414a-8a64-4139dc429f7en%40googlegroups.com.
Re: UnicodeEncodeError when trying to see Ticket [ In reply to ]
On Tuesday, October 6, 2020 at 10:49:49 AM UTC-4 jantso...@gmail.com wrote:

> Hello.
>
> I noticed today that 99% of my tickets are failing to the error message
> below.
>
> 2020-10-06 10:38:34,229 Trac[main] ERROR: [172.18.0.3] Internal Server
> Error: <RequestWithSession "GET '/ticket/11397'">, referrer '
> http://url/proj/ '
>
> Traceback (most recent call last):
>
> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 647, in
> _dispatch_request
>
> dispatcher.dispatch(req)
>
> File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 268, in
> dispatch
>
> iterable=chrome.use_chunked_encoding)
>
> File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 1134, in
> render_template
>
> stream |= self._filter_stream(req, method, filename, stream, data)
>
> File
> "/usr/lib/python2.7/site-packages/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py",
> line 133, in __or__
>
> return Stream(_ensure(function(self)), serializer=self.serializer)
>
> File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 1447, in
> inner
>
> data)
>
> File "build/bdist.linux-x86_64/egg/ticketdep/web_ui.py", line 137, in
> filter_stream
>
> return self._filter_ticket_stream(req, method, filename, stream, data)
>
> File "build/bdist.linux-x86_64/egg/ticketdep/web_ui.py", line 210, in
> _filter_ticket_stream
>
> parser = XMLParser(StringIO(dep_str))
>
> File "/usr/lib64/python2.7/StringIO.py", line 57, in __init__
>
> buf = str(buf)
>
> File
> "/usr/lib/python2.7/site-packages/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/builder.py",
> line 107, in __str__
>
> return str(self.generate())
>
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in
> position 5623: ordinal not in range(128)
>
>
> So if I try and open one ticket, I get that error message. I'm running it
> via tracd and clients can connect via ReverseProxy which is hosted on
> Docker container with nginx running. I'm running version 1.2.6
>

Which Genshi version? You can find it listed on the /about page.

You may want to try upgrading to the latest: 0.7.3

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/c6e750e2-dc12-43d7-a5a3-e8aa5f81e59dn%40googlegroups.com.