python 读取文件时报错UnicodeDecodeError: 'gbk' codec can't decode byte 0x96 in position 7811: illegal multi

UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x96 in position 7811: illegal multibyte sequence

解决办法1.
open(‘file’,‘r’, encoding=‘UTF-8’)
解决办法2.
open(‘file’,‘rb’)

你可能感兴趣的:(python,file,python,file)