UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd4 in position 3374: invalid continuation byte
时间: 2023-09-27 16:08:11 浏览: 184
这个错误通常是由于编码问题导致的。当使用utf-8编码读取文件时,如果遇到无效的字节序列,就会引发UnicodeDecodeError错误。解决这个问题的一种方法是将csv文件的编码格式改为utf-8。可以通过另存为utf格式的方式来实现,然后在读取csv文件时使用encoding='utf-8'参数进行指定编码格式。这样就可以成功解决这个错误了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 2: invalid continuation byte-...](https://download.csdn.net/download/weixin_42204453/15589184)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd4 in position 1: invalid continuation byte...](https://blog.csdn.net/dosomeresearch/article/details/130877254)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd3 in position 0: invalid continuation byte](https://blog.csdn.net/qq_41934715/article/details/130716727)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文