#1295 python3 koji-web fails on UnicodeDecodeError compiling template
Closed: Fixed 4 years ago by mikem. Opened 4 years ago by mikem.

I'm seeing this on F28, though I was not before. It may be a quirk of my system, but this is what I'm seeing:

Traceback (most recent call last):
  File "/usr/share/koji-web/scripts/wsgi_publisher.py", line 378, in handle_request
    result = func(environ, **data)
  File "/usr/share/koji-web/scripts/index.py", line 1401, in rpminfo
    return _genHTML(environ, 'rpminfo.chtml')
  File "/usr/share/koji-web/lib/kojiweb/util.py", line 157, in _genHTML
    return tmpl_inst.respond()
  File "rpminfo_chtml.py", line 94, in respond
  File "/usr/lib64/python3.6/site-packages/Cheetah/Template.py", line 1692, in _handleCheetahInclude
    file=file)
  File "/usr/lib64/python3.6/site-packages/Cheetah/Template.py", line 773, in compile
    settings=(compilerSettings or {}))
  File "/usr/lib64/python3.6/site-packages/Cheetah/Compiler.py", line 1658, in __init__
    source = f.read()
  File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 421: ordinal not in range(128)

It's tripping over the unicode in header.chtml. So far this is a messy rabbit hole.

It doesn't happen when I run devtools/fakeweb.
It doesn't happen when I run /usr/sbin/httpd -DFOREGROUND
This makes it very hard to debug.


Metadata Update from @mikem:
- Issue set to the milestone: 1.17
- Issue tagged with: bug, deprecation

4 years ago

Metadata Update from @mikem:
- Issue untagged with: deprecation

4 years ago

Login to comment on this ticket.

Metadata