(一)报错原因:
不能识别GBK
(二)解决方法
定位报错代码:
def cfg_from_file(filename):
"""Load a config file and merge it into the default options."""
import yaml
with open(filename, 'r') as f:
yaml_cfg = edict(yaml.full_load(f))
_merge_a_into_b(yaml_cfg, __C)
修改代码如下:
def cfg_from_file(filename):
"""Load a config file and merge it into the default options."""
import yaml
with open(filename, 'r', encoding='UTF-8') as f:
yaml_cfg = edict(yaml.full_load(f))
_merge_a_into_b(yaml_cfg, __C)