fix issue#13 encoding error
This commit is contained in:
parent
005c4f6170
commit
0d268274b7
|
@ -26,7 +26,7 @@ import yaml
|
||||||
|
|
||||||
# 加载YAML文件
|
# 加载YAML文件
|
||||||
webui_yaml_filename = "webui_zh.yaml" if True else "webui_en.yaml"
|
webui_yaml_filename = "webui_zh.yaml" if True else "webui_en.yaml"
|
||||||
with open(os.path.join(cur_dir, f"yamls/{webui_yaml_filename}"), 'r') as f:
|
with open(os.path.join(cur_dir, f"yamls/{webui_yaml_filename}"), 'r', encoding='utf-8') as f:
|
||||||
try:
|
try:
|
||||||
webui_configs = yaml.safe_load(f)
|
webui_configs = yaml.safe_load(f)
|
||||||
except yaml.YAMLError as exc:
|
except yaml.YAMLError as exc:
|
||||||
|
|
Loading…
Reference in New Issue