From 92264dac943fe8dde5c615e67ccb786837a5e9fb Mon Sep 17 00:00:00 2001 From: WeberJulian Date: Fri, 17 Nov 2023 11:57:57 +0100 Subject: [PATCH 1/2] Add short timeout to check_config --- TTS/utils/manage.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TTS/utils/manage.py b/TTS/utils/manage.py index 1cd437e611..2e63e24532 100644 --- a/TTS/utils/manage.py +++ b/TTS/utils/manage.py @@ -352,8 +352,7 @@ def check_if_configs_are_equal(self, model_name, model_item, output_path): remote_url = url break - with fsspec.open(remote_url, "r", encoding="utf-8") as f: - config_remote = json.load(f) + config_remote = requests.get(remote_url, timeout=2).json() if not config_local == config_remote: print(f" > {model_name} is already downloaded however it has been changed. Redownloading it...") From 64e75cbcb285ccfb79492ab6adc7b15d500705b5 Mon Sep 17 00:00:00 2001 From: Julian Weber Date: Mon, 11 Dec 2023 23:44:09 +0100 Subject: [PATCH 2/2] Update TTS/utils/manage.py Co-authored-by: Aarni Koskela --- TTS/utils/manage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TTS/utils/manage.py b/TTS/utils/manage.py index 2e63e24532..674b03fbfa 100644 --- a/TTS/utils/manage.py +++ b/TTS/utils/manage.py @@ -352,7 +352,9 @@ def check_if_configs_are_equal(self, model_name, model_item, output_path): remote_url = url break - config_remote = requests.get(remote_url, timeout=2).json() + resp = requests.get(remote_url, timeout=2) + resp.raise_for_status() + config_remote = resp.json() if not config_local == config_remote: print(f" > {model_name} is already downloaded however it has been changed. Redownloading it...")