UnicodeDecode Error
See original GitHub issueGot this problem when I tried to update an issue with a new comment:
Traceback (most recent call last):
File "/Users/yash/.pyenv/versions/2.7.10/bin/statuspage", line 11, in <module>
sys.exit(cli())
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/statuspage/statuspage.py", line 73, in update
run_update(name=name, token=token, org=org)
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/statuspage/statuspage.py", line 211, in run_update
if is_same_content(content, base64.b64decode(index.content)):
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/statuspage/statuspage.py", line 478, in is_same_content
return sha1(c1).hexdigest() == sha1(c2).hexdigest()
File "/Users/yash/.pyenv/versions/2.7.10/lib/python2.7/site-packages/statuspage/statuspage.py", line 476, in sha1
c = c.encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 2735: ordinal not in range(128)
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
UnicodeDecodeError - Python Wiki
The UnicodeDecodeError normally happens when decoding an str string from a certain coding. Since codings map only a limited number of str ...
Read more >How to fix: "UnicodeDecodeError: 'ascii' codec can't decode ...
UnicodeDecodeError : 'ascii' codec can't decode byte generally happens when you try to convert a Python 2.x str that contains non-ASCII to a...
Read more >UnicodeDecodeError utf-8 codec can t decode byte in position ...
While I importing the file it shows UnicodeDecodeError: "utf-8" codec can"t decode byte 0xa0 in position ... as pd a ...
Read more >'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
UnicodeDecodeError : 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte solved in Django .The error is on the line ......
Read more >How to resolve a UnicodeDecodeError for a CSV file - Kaggle
_string_box_utf8() UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 1: invalid continuation byte During handling of the above exception, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can now reproduce the bug:
statuspage update
in terminal)statuspage update
in terminal)So the errors seems to occur when a UTF8 char is present in the index.html file and statuspage.py tries to read it.
Maybe this error: https://stackoverflow.com/questions/3235386/python-using-format-on-a-unicode-escaped-string
Just getting this error too, with Python 2.7.13.