From c5f0cb3d3faa06d0fa7335569247310d08e5f004 Mon Sep 17 00:00:00 2001 From: profound Date: Wed, 12 Apr 2023 23:38:30 +0800 Subject: [PATCH] fix read config file encoding that broke Chinese --- scripts/ai_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ai_config.py b/scripts/ai_config.py index bd373944fc..743c87e4e0 100644 --- a/scripts/ai_config.py +++ b/scripts/ai_config.py @@ -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 = {}