langchain-ai/langgraph · error · AttributeError

module has no attribute

Error message

module has no attribute '{name}'

What it means

Raised by the module __getattr__ in langgraph.constants when an attribute that no longer exists is looked up (the deprecated private-constant fallback also failed with AttributeError). It is a generic guard naming the missing attribute `name`.

Solutions

  1. Check the attribute spelling against the current langgraph.constants module contents
  2. Stop importing private constants; use the public replacements or vendor the value locally
  3. Pin/import from langgraph._internal._constants only if you accept private-API breakage
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at libs/langgraph/langgraph/constants.py:64 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26). Data as JSON: /api/errors/d321dc85f73cbc96. Report an issue: GitHub.

Appendix: source

Thrown at libs/langgraph/langgraph/constants.py:64

        return getattr(module, name)

    try:
        from importlib import import_module

        private_constants = import_module("langgraph._internal._constants")
        attr = getattr(private_constants, name)
        warn(
            f"Importing {name} from langgraph.constants is deprecated. "
            f"This constant is now private and should not be used directly. "
            "Please let the LangGraph team know if you need this value.",
            LangGraphDeprecatedSinceV10,
            stacklevel=2,
        )
        return attr
    except AttributeError:
        pass

    raise AttributeError(f"module has no attribute '{name}'")

View on GitHub (pinned to 38031739e5)