Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
log import errors for default plugins (#4866)
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh authored Dec 15, 2020
1 parent f2a5331 commit d408f41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions allennlp/common/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def import_plugins() -> None:
# For default plugins we recursively import everything.
import_module_and_submodules(module_name)
logger.info("Plugin %s available", module_name)
except ModuleNotFoundError:
pass
except ModuleNotFoundError as e:
if e.name != module_name:
logger.error(f"Plugin {module_name} could not be loaded: {e}")
for module_name in discover_plugins():
try:
importlib.import_module(module_name)
Expand Down

0 comments on commit d408f41

Please sign in to comment.