'utf-8' codec can't decode byte 0xb7 in position 4: invalid start byte
时间: 2023-10-10 10:15:14 浏览: 233
这个错误是由于编码问题导致的,'utf-8'编码无法解码字节0xb7。解决方案是尝试使用其他编码方式,如gbk编码。可以在代码中使用open函数,并指定使用gbk编码来打开文件。这样可以避免编码错误。另外,也可以尝试使用geany编辑器,并将文件编码设置为gbk,以解决这个问题。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [python机器学习mooc解决K-means代码无法运行的问题](https://download.csdn.net/download/weixin_38551376/13743426)[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* [utf-8' codec can't decode byte 0xb7](https://blog.csdn.net/X_sk0810/article/details/81812598)[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* [【Python】UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xba in position 4: invalid start ...](https://blog.csdn.net/qq_45797116/article/details/122424131)[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 ]
阅读全文