fix read config file encoding that broke Chinese

This commit is contained in:
profound
2023-04-12 23:38:30 +08:00
parent 16b37fff1d
commit c5f0cb3d3f

View File

@@ -46,7 +46,7 @@ class AIConfig:
"""
try:
with open(config_file) as file:
with open(config_file, encoding='utf-8') as file:
config_params = yaml.load(file, Loader=yaml.FullLoader)
except FileNotFoundError:
config_params = {}