UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x9d in position 5216: ill

解决    UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 5216: illegal multibyte sequence 报错问题。

方法仅供参考:

# 修改前
with open(file_name, "r") as f: 
# 修改后
with open(file_name, "r", encoding="utf-8") as f:

问题解决。

你可能感兴趣的:(前端,java,linux,python)