UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbe in position 14267: invalid start byte
时间: 2023-10-22 21:05:33 浏览: 105
这错误的原因是'utf-8'编解码器无法解码位于第14267位置的字节0xbe,这是一个无效的起始字节。根据引用和引用的解释,切换编码为'gbk'可能会解决这个问题。如果'utf-8'和'gbk'都无法使用,那么使用Notepad++等编辑器打开文件时可能会出现乱码或黑色方块。根据引用的建议,可以尝试使用pd.read_csv函数的encoding参数指定正确的编码格式来解决这个问题。<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 0xbe in position 0: invalid start byte](https://blog.csdn.net/qq_41725313/article/details/124727610)[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* [Python基于codecs模块实现文件读写案例解析](https://download.csdn.net/download/weixin_38750861/13711396)[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 0xb0 in position 2: invalid start byte](https://blog.csdn.net/m0_56230003/article/details/130326974)[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 ]
阅读全文