langchain-ai/langgraph · error · ValueError
Graph '{graph_id}' must be a string or a dictionary with a '
Error message
Graph '{graph_id}' must be a string or a dictionary with a 'path' key. What it means
Error "Graph '{graph_id}' must be a string or a dictionary with a 'path' key." thrown in langchain-ai/langgraph.
Source
Thrown at libs/cli/langgraph_cli/uv_lock.py:802
if "path" not in data:
raise ValueError(
f"Graph '{graph_id}' must contain a 'path' key if it is a dictionary."
)
config["graphs"][graph_id]["path"] = _rewrite_uv_lock_import_path(
config_path,
data["path"],
plan,
label=f"graph '{graph_id}'",
)
elif isinstance(data, str):
config["graphs"][graph_id] = _rewrite_uv_lock_import_path(
config_path,
data,
plan,
label=f"graph '{graph_id}'",
)
else:
raise ValueError(
f"Graph '{graph_id}' must be a string or a dictionary with a 'path' key."
)
def _update_uv_lock_component_path(
config_path: pathlib.Path,
config: Config,
plan: UvLockPlan,
*,
section: str,
key: str,
label: str,
) -> None:
section_config = config.get(section)
if not isinstance(section_config, dict):
return
path_str = section_config.get(key)View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/cli/langgraph_cli/uv_lock.py:802 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/a7e7be446fbe48d0.
Report an issue: GitHub.