langchain-ai/langgraph · error · InvalidNamespaceError

Namespace labels cannot be empty strings. Got

Error message

Namespace labels cannot be empty strings. Got {label} in {namespace}

What it means

Content check inside _validate_namespace: a label in the namespace is the empty string ''. This typically results from a trailing/leading/double separator when building the tuple (e.g. ('docs', '') from 'docs.'.split('.') or tuple(parts) with a blank element), which would create ambiguous or colliding paths.

Solutions

  1. Filter out empty parts: tuple(p for p in parts if p)
  2. Fix string splitting that yields blanks, e.g. strip separators before split and drop empty segments
  3. Log the offending namespace to find which upstream call produces the blank label
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at libs/checkpoint/langgraph/checkpoint/store/base/__init__.py:1277 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/48be13d1322d5bfa. Report an issue: GitHub.

Appendix: source

Thrown at libs/checkpoint/langgraph/checkpoint/store/base/__init__.py:1277

        elif not label:
            raise InvalidNamespaceError(
                f"Namespace labels cannot be empty strings. Got {label} in {namespace}"
            )
    if namespace[0] == "langgraph":
        raise InvalidNamespaceError(
            f'Root label for namespace cannot be "langgraph". Got: {namespace}'
        )

View on GitHub (pinned to 38031739e5)