Commit d244a1c1 authored by myhloli's avatar myhloli

fix(config_reader): add utf-8 encoding when reading config file

Specify utf-8 encoding when opening the configuration file to ensure
compatibility with files containing non-ASCII characters, avoiding potentialencoding errors.
parent ca737d5c
......@@ -22,7 +22,7 @@ def read_config():
if not os.path.exists(config_file):
raise FileNotFoundError(f"{config_file} not found")
with open(config_file, "r") as f:
with open(config_file, "r", encoding="utf-8") as f:
config = json.load(f)
return config
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment