fix issue#13 encoding error

This commit is contained in:
lightislost 2023-12-29 18:29:33 +08:00 committed by GitHub
parent 005c4f6170
commit 0d268274b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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: