UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 3444: illegal multibyte sequence
时间: 2023-09-26 13:10:43 浏览: 85
这个错误提示是由于在使用GBK编码解码时,遇到了非法的多字节序列导致无法解码。这个问题在读取文本信息或者读取yaml文件时都可能会发生。解决办法是将编码格式改为UTF-8,因为UTF-8是一种更通用的编码方式,可以支持更广泛的字符集。你可以通过在读取文件时指定编码方式为UTF-8来解决这个问题。另外,这个错误也可能是文件本身包含了无效的字符,你可以尝试删除或者修复这些字符以解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [UnicodeDecodeError: ‘gbk‘ codec can‘t decode bytein position 2: illegal multibyte sequence](https://blog.csdn.net/sinat_26811377/article/details/107629934)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa7 in position 265: illegal multibyte ...](https://blog.csdn.net/qq_44368508/article/details/126831706)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文