Skip to content

UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 8: ordinal not in range(128) #24

Description

@mgedmin

I've an UWSGI-based irclog2html deployment that fails to render the index page with the following error:

Traceback (most recent call last):
  File "/opt/irclog2html/local/lib/python2.7/site-packages/irclog2html/irclogserver.py", line 213, in application
    dir_listing(stream, chan_path)
  File "/opt/irclog2html/local/lib/python2.7/site-packages/irclog2html/irclogserver.py", line 116, in dir_listing
    % (quote_plus(channel.name), escape(channel.name)),
  File "/opt/irclog2html/local/lib/python2.7/site-packages/irclog2html/irclog2html.py", line 354, in escape
    s = s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 8: ordinal not in range(128)

This is on Python 2.7.

My irclogs tree has a directory named '#gnome-'$'\020''�s��'$'\177', which is a result of a terrible irssi accident, I expect.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions