python讀取文件時(shí)報(bào)錯(cuò)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa5 in position 93: illegal multibyte sequence
解決
with open("t.json", 'rb') as f:
data = json.load(f)
with open("t.json", 'r',encoding='UTF-8') as f:
data = json.load(f)