yolov5 'gbk' codec can't decode byte 0x80 in position 160: illegal multibyte sequence
时间: 2023-08-11 13:05:38 浏览: 158
basemap readshapefile UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 0-附件资源
这个报错是由于文件编码格式不匹配导致的。根据引用\[2\]中的解决方法,你可以尝试将打开文件的编码格式修改为utf-8。修改前的代码是`open(file_path, 'r')`,你可以将其修改为`open(file_path, 'r', encoding='utf-8')`。这样就可以解决报错问题了。
#### 引用[.reference_title]
- *1* [ ‘gbk’ codec can’t decode byte 0x80 in position 2467: illegal multibyte sequence](https://blog.csdn.net/wujiaojue/article/details/129906085)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x8c in position 62: illegal multibyte sequence](https://blog.csdn.net/lcecube/article/details/131174244)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x80 in position 198: illegal multibyte sequence](https://blog.csdn.net/hhhhhhhhhhwwwwwwwwww/article/details/128225609)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文