diff --git a/jd4/config.py b/jd4/config.py index 214876a..ac9ab2e 100644 --- a/jd4/config.py +++ b/jd4/config.py @@ -29,7 +29,7 @@ def _load_config(): async def save_config(): def do_save_config(): - with open(_CONFIG_FILE, 'wb') as file: + with open(_CONFIG_FILE, 'w', encoding='utf-8', errors='replace') as file: yaml.dump(config, file, Dumper=yaml.RoundTripDumper) await get_event_loop().run_in_executor(None, do_save_config)