Skip to content

Commit d3072e2

Browse files
authored
feat(core): update _import_utils.py to not mask the thrown exception (#32071)
1 parent b493725 commit d3072e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/core/langchain_core/_import_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def import_attr(
2727
else:
2828
try:
2929
module = import_module(f".{module_name}", package=package)
30-
except ModuleNotFoundError:
31-
msg = f"module '{package!r}.{module_name!r}' not found"
30+
except ModuleNotFoundError as err:
31+
msg = f"module '{package!r}.{module_name!r}' not found ({err})"
3232
raise ImportError(msg) from None
3333
result = getattr(module, attr_name)
3434
return result

0 commit comments

Comments
 (0)