编码方式错误
将
w
i
t
h
o
p
e
n
(
f
i
l
e
i
n
,
“
r
”
)
a
s
f
i
l
e
:
改
为
w
i
t
h
o
p
e
n
(
f
i
l
e
i
n
,
“
r
”
,
e
n
c
o
d
i
n
g
=
‘
U
T
F
−
8
’
)
a
s
f
i
l
e
即
可
\color{red}{将with open(file_in,“r”) as file:改为with open(file_in,“r”,encoding=‘UTF-8’) as file即可}
将withopen(filein,“r”)asfile:改为withopen(filein,“r”,encoding=‘UTF−8’)asfile即可
UnicodeDecodeError: 'gbk' codec can't decode byte 0x82 in position 66: illegal multibyte sequence
最新推荐文章于 2023-05-04 20:25:08 发布