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: 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte

See original GitHub issue

在windows11上面,我使用pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html安装了mmcv-full 1.5.0。 之后使用测试脚本测试是否安装成功,出现了如下错误:

C:\Users\ZhangQu\.conda\envs\mmlab\python.exe D:/masterResearch/envtest/check_mmcv.py
Start checking the installation of mmcv-full ...
CPU ops were compiled successfully.
CUDA ops were compiled successfully.
mmcv-full has been installed successfully.

Traceback (most recent call last):
  File "D:\masterResearch\envtest\check_mmcv.py", line 40, in <module>
    env_info_dict = collect_env()
  File "C:\Users\ZhangQu\.conda\envs\mmlab\lib\site-packages\mmcv\utils\env.py", line 91, in collect_env
    env_info['MSVC'] = cc.decode(encoding).partition('\n')[0].strip()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 0: invalid continuation byte

Process finished with exit code 1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
creater-zqcommented, Apr 23, 2022

@creater-zq 请帮忙测试一下 #1905 是否可以解决该问题,只用修改本地环境对应的代码即可,谢谢

  • 正常工作,谢谢 image
1reaction
creater-zqcommented, Apr 22, 2022

@SuTanTank

import sys, os, locale

print(locale.getdefaultlocale())
print(sys.stdout.fileno())
print(os.device_encoding(sys.stdout.fileno()))
print(sys.getdefaultencoding())
  • 我在Ubuntu20.04测试结果:
('zh_CN', 'UTF-8')
1
UTF-8
utf-8
Read more comments on GitHub >

github_iconTop Results From Across the Web

UnicodeDecodeError, invalid continuation byte - Stack Overflow
Then the error is displaying like this :- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 1: invalid continuation byte.
Read more >
UnicodeDecodeError: 'utf-8' codec can't decode byte in position
The Python "UnicodeDecodeError: 'utf-8' codec can't decode byte in position: invalid continuation byte" occurs when we specify an incorrect ...
Read more >
UnicodeDecodeError: 'utf-8' codec can't decode byte [...] in ...
In this blog post, we're solving UnicodeDecodeError: 'utf-8' codec can't decode byte […] in position […]: invalid continuation byte. Important, ...
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 >
`UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in ...
Encoding error : UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 2: invalid continuation byte #976.
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