langchain-ai/langgraph · error · TypeError
path parameter must not be None
Error message
path parameter must not be None
What it means
Argument guard in the path-encoding helper: value is None, which cannot be URL-path-encoded. The helper accepts str/UUID-like values to embed in request paths, and None indicates a missing required identifier at the call site.
Solutions
- Pass the actual identifier (str or uuid.UUID) instead of None
- Check upstream logic that produced a None id (e.g. a failed lookup) before calling the SDK
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at libs/sdk-py/langgraph_sdk/_shared/utilities.py:221 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/8149017f1307740f.
Report an issue: GitHub.
Appendix: source
Thrown at libs/sdk-py/langgraph_sdk/_shared/utilities.py:221
Path segments are encoded with ``safe=""`` so that ``/`` and other reserved
characters are escaped. Standalone dot-segments (``.`` and ``..``) are also
encoded because some URL-handling stacks (including ``httpx``) collapse
them client-side as relative-path traversal before transmission. The value
is coerced to ``str`` so callers can pass ``uuid.UUID`` and similar types
directly without changing call sites.
A properly formed identifier (for example, a standard UUID, which contains
no dots or reserved characters) round-trips through this function
unchanged.
Raises:
TypeError: If `value` is `None` or a `bytes`/`bytearray` instance.
Coercing those would produce misleading paths (e.g. `/threads/None`),
so surface the caller bug instead.
"""
if value is None:
raise TypeError("path parameter must not be None")
if isinstance(value, (bytes, bytearray)):
raise TypeError("path parameter must not be bytes; pass a str or uuid.UUID")
quoted = quote(str(value), safe="")
# Bare "." or ".." (or any all-dot string) acts as a relative-path segment
# that some HTTP stacks (including ``httpx``) collapse client-side before
# transmission. Encode the dots so the segment becomes opaque to that
# logic. Mixed values like "agent.v1" are unaffected.
if quoted and all(c == "." for c in quoted):
quoted = "%2E" * len(quoted)
return quoted
_registered_transports: list[httpx.ASGITransport] = []
# Do not move; this is used in the server.
def configure_loopback_transports(app: Any) -> None:
for transport in _registered_transports:View on GitHub (pinned to 38031739e5)