From 2851602052ccd03034bb0f16f71a07f2471da5ec Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Sun, 20 Jun 2021 22:57:58 +0200 Subject: Add a reason for why an Addon can not be loaded. This change gives a more detailed explanation of the issue and may help the Addon Developer to identify what exactly needs to be changed. The current message 'addon not loaded' is a bit too sparse. Differential Revision: https://developer.blender.org/D11655 --- release/scripts/modules/addon_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py index 239dd1cf79b..73b978d7d2d 100644 --- a/release/scripts/modules/addon_utils.py +++ b/release/scripts/modules/addon_utils.py @@ -358,7 +358,8 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non except Exception as ex: # if the addon doesn't exist, don't print full traceback if type(ex) is ImportError and ex.name == module_name: - print("addon not found:", repr(module_name)) + print("addon not loaded:", repr(module_name)) + print("cause:", str(ex)) else: handle_error(ex) -- cgit v1.2.3