You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: LangchainIntegration crashes on Python 3.14 — ModuleNotFoundError: No module named 'langchain_classic' #6265
Call sentry_sdk.init() with any integration that auto-enables LangchainIntegration
Start gunicorn workers
Expected Result
LangchainIntegration degrades gracefully — AgentExecutor falls back to None and the application starts normally.
Actual Result
Worker process crashes at startup with:
ModuleNotFoundError: No module named 'langchain_classic'
from langchain_classic.agents import AgentExecutor
File ".../sentry_sdk/integrations/langchain.py", line 60, in
File ".../gunicorn/arbiter.py", line 608, in spawn_worker
error [ERROR] Exception in worker process
Root cause — two problems in langchain.py lines 58–66:
Problem occurs when execute the class Chain statement of the langchain.chains.base.Chain class.
The langchain.agents module we load also imports the class.
A related bug report is pydantic/pydantic#13036
Here's the Dockerfile to repro (assumes you have a repro.py, ideally with some LangChain imports):
Activity
linear-code commentedon May 13, 2026
PY-2416
ericapisani commentedon May 14, 2026
@SebastianDT1 Thanks for opening an issue with us, I've added this to the team's backlog and someone will take a look.
alexander-alderman-webb commentedon May 15, 2026
Problem occurs when execute the
class Chainstatement of thelangchain.chains.base.Chainclass.The
langchain.agentsmodule we load also imports the class.A related bug report is pydantic/pydantic#13036
Here's the Dockerfile to repro (assumes you have a
repro.py, ideally with some LangChain imports):