赞
踩
File "C:\Users\jun\.conda\envs\yolov7\lib\site-packages\yaml\loader.py", line 34, in __init__
Reader.__init__(self, stream)
File "C:\Users\jun\.conda\envs\yolov7\lib\site-packages\yaml\reader.py", line 85, in __init__
self.determine_encoding()
File "C:\Users\jun\.conda\envs\yolov7\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
self.update_raw()
File "C:\Users\jun\.conda\envs\yolov7\lib\site-packages\yaml\reader.py", line 178, in update_raw
data = self.stream.read(size)
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 234: illegal multibyte sequence
在运行文件中搜索,with open,添加encoding='utf-8'
if isinstance(data, str):
is_coco = data.endswith('coco.yaml')
with open(data,encoding='utf-8') as f:
data = yaml.load(f, Loader=yaml.SafeLoader)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。