Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mgedmin opened this issue Jun 23, 2019 · 1 comment
Labels

Comments

@mgedmin
Copy link
Owner

mgedmin commented Jun 23, 2019

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.

@mgedmin
Copy link
Owner Author

mgedmin commented Jun 23, 2019

Git calls that directory "#gnome-\020\357\277\275s\357\277\275\357\277\275\177".

Removing it fixes the Unicode error.

@mgedmin mgedmin added the bug label Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant