From 35c75115de3b3635aa8b888dadbc588fe848651b Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 19 Apr 2023 16:20:08 +0530 Subject: [PATCH] Log errors during module and model initialization --- scripts/check_models.py | 2 ++ scripts/check_modules.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/check_models.py b/scripts/check_models.py index aeae27d9..0513bdbf 100644 --- a/scripts/check_models.py +++ b/scripts/check_models.py @@ -6,6 +6,7 @@ from sdkit.utils import hash_file_quick import os import shutil from glob import glob +import traceback models_base_dir = os.path.abspath(os.path.join("..", "models")) @@ -55,6 +56,7 @@ def init(): try: download_if_necessary(model_type, model["file_name"], model["model_id"]) except: + traceback.print_exc() fail(model_type) print(model_type, "model(s) found.") diff --git a/scripts/check_modules.py b/scripts/check_modules.py index ffbbd08b..b457ba8a 100644 --- a/scripts/check_modules.py +++ b/scripts/check_modules.py @@ -11,6 +11,7 @@ a custom index URL depending on the platform. import os from importlib.metadata import version as pkg_version import platform +import traceback os_name = platform.system() @@ -58,6 +59,7 @@ def init(): try: install(module_name, latest_version) except: + traceback.print_exc() fail(module_name) print(f"{module_name}: {version(module_name)}")