diff --git a/src/griffe/loader.py b/src/griffe/loader.py index 020830db..a585968c 100644 --- a/src/griffe/loader.py +++ b/src/griffe/loader.py @@ -323,7 +323,7 @@ def expand_wildcards( continue try: self.load(package, try_relative_path=False) - except ImportError as error: + except (ImportError, LoadingError) as error: logger.debug(f"Could not expand wildcard import {member.name} in {obj.path}: {error}") continue @@ -457,7 +457,7 @@ def resolve_module_aliases( logger.debug(f"Failed to resolve alias {member.path} -> {target}") try: self.load(package, try_relative_path=False) - except ImportError as error: + except (ImportError, LoadingError) as error: logger.debug(f"Could not follow alias {member.path}: {error}") load_failures.add(package) except CyclicAliasError as error: