admin管理员组文章数量:1611196
解决UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xa7 in position 85: illegal multibyte sequence
代码
in_file = open(r'..\Annotations\%s.xml' %
(image_id))
报错信息
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa7 in position 85: illegal multibyte sequence
解决办法
in_file = open(r'..\Annotations\%s.xml' %
(image_id), encoding='UTF-8')
open打开xml文本,声明Encoding编码方式UTF-8
欢迎大家交流学习,任何问题都可以留言
本文标签: DecodebyteCodecUnicodeDecodeErrorgbk
版权声明:本文标题:解决UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa7 in position 85: illegal multibyte sequence 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1728606822a1165557.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论