question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnicodeDecodeError accured!

See original GitHub issue

❓ Questions and Help

When I train fasterrcnn, error accured blow: /anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torch/utils/collect_env.py", line 44, in run err = err.decode(“ascii”) UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe6 in position 22: ordinal not in range(128)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
Swjtu-onlycommented, Apr 13, 2019

When I modify to utf-8, the following problems occurred: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xb0 in position 25: invalid start byte。 so, i tryed to change to gbk ,it work well.

4reactions
LDoubleZhicommented, Dec 14, 2018

@fmassa I modify the collect_env.py def run(command): ........ if PY3: output = output.decode("utf-8") err = err.decode("utf-8") return rc, output.strip(), err.strip()

Read more comments on GitHub >

github_iconTop Results From Across the Web

error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff ...
Python tries to convert a byte-array (a bytes which it assumes to be a utf-8-encoded string) to a unicode string ( str )....
Read more >
How to resolve a UnicodeDecodeError for a CSV file - Kaggle
How to resolve a UnicodeDecodeError for a CSV file ... the above exception, another exception occurred: UnicodeDecodeError Traceback (most recent call last) ...
Read more >
Built-in Exceptions — Python 3.11.1 documentation
Raised when a Unicode-related error occurs during encoding. It is a subclass of UnicodeError . exception UnicodeDecodeError¶. Raised when ...
Read more >
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d
Traceback (most recent call last): File "Conditional.py", line 108, in module for line in file1: File "cp1252.py", line 23, in decode return ...
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found