From 20e0f96ae29d082dc32b918cfee1aa042d183dc2 Mon Sep 17 00:00:00 2001 From: AWAS666 Date: Mon, 11 Mar 2024 22:04:32 +0100 Subject: [PATCH] feat: make files parsable on windows --- melo/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/melo/utils.py b/melo/utils.py index bafca5a6d..fdeadbde3 100644 --- a/melo/utils.py +++ b/melo/utils.py @@ -269,12 +269,12 @@ def get_hparams(init=True): config_path = args.config config_save_path = os.path.join(model_dir, "config.json") if init: - with open(config_path, "r") as f: + with open(config_path, "r",encoding="utf8") as f: data = f.read() - with open(config_save_path, "w") as f: + with open(config_save_path, "w",encoding="utf8") as f: f.write(data) else: - with open(config_save_path, "r") as f: + with open(config_save_path, "r",encoding="utf8") as f: data = f.read() config = json.loads(data)