From d11cfd5dbd9aad2fdc6cbcd0eddfaa61a76c1bd5 Mon Sep 17 00:00:00 2001 From: butaixianran Date: Fri, 17 Mar 2023 20:53:42 +0800 Subject: [PATCH] update err msg --- README.md | 3 +++ scripts/lib/model_action_civitai.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index d7015db..24a406c 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,9 @@ Since v1.5.5, we've already optimized the SHA256 function to the top. So the onl # Change Log +## v1.5.6 +* update error msg when can not connect to civitai API service + ## v1.5.5 * update SHA256 function, now it just use the code from pip diff --git a/scripts/lib/model_action_civitai.py b/scripts/lib/model_action_civitai.py index d4fb857..24c4f7a 100644 --- a/scripts/lib/model_action_civitai.py +++ b/scripts/lib/model_action_civitai.py @@ -207,6 +207,10 @@ def get_model_info_by_url(model_url_or_id:str) -> tuple: return model_info = civitai.get_model_info_by_id(model_id) + if model_info is None: + util.printD("Connect to Civitai API service failed. Wait a while and try again") + return + if not model_info: util.printD("failed to get model info from url or id") return