Skip to content

Commit 206bae9

Browse files
fix(langchain): Catch TypeError on langchain.agents import
1 parent d1fc138 commit 206bae9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sentry_sdk/integrations/langchain.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
try:
6262
# <v1
6363
from langchain.agents import AgentExecutor
64-
except ImportError:
64+
# Catch TypeError due to changes in type hint evaluation order: https://github.com/pydantic/pydantic/issues/13036
65+
except (ImportError, TypeError):
6566
AgentExecutor = None
6667

6768

0 commit comments

Comments
 (0)