The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
feat(core): update `_import_utils.py` to not mask the thrown exception (#32071)
efj-amznd3072e2d2e82
diff --git a/libs/core/langchain_core/_import_utils.py b/libs/core/langchain_core/_import_utils.pyindex 6c1d99a3f4..6f4d0a5df2 100644--- a/libs/core/langchain_core/_import_utils.py+++ b/libs/core/langchain_core/_import_utils.py@@ -27,8 +27,8 @@ def import_attr(else:try:module = import_module(f".{module_name}", package=package)- except ModuleNotFoundError:- msg = f"module '{package!r}.{module_name!r}' not found"+ except ModuleNotFoundError as err:+ msg = f"module '{package!r}.{module_name!r}' not found ({err})"raise ImportError(msg) from Noneresult = getattr(module, attr_name)return result