{"record":{"id":"fdfc24856ce3df9c","repo":"langchain-ai/langgraph","slug":"graph-graph-id-must-contain-a-path-key-if-it","errorCode":null,"errorMessage":"Graph '{graph_id}' must contain a 'path' key if it is a dictionary.","messagePattern":"Graph '(.+?)' must contain a 'path' key if it is a dictionary\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/cli/langgraph_cli/uv_lock.py","lineNumber":785,"sourceCode":"        raise click.UsageError(\n            f\"{label.capitalize()} '{import_str}' resolves to {resolved}, which is \"\n            f\"not inside the target package '{plan.target.name}' or any of its \"\n            f\"workspace dependencies. Only these directories are copied into the \"\n            f\"container: {copied_dirs}. If this file lives in another workspace \"\n            f\"package, add it as a dependency of '{plan.target.name}' with \"\n            \"`{ workspace = true }` in [tool.uv.sources].\"\n        )\n\n    return f\"{container_path.as_posix()}:{attr_str}\"\n\n\ndef _update_uv_lock_graph_paths(\n    config_path: pathlib.Path, config: Config, plan: UvLockPlan\n) -> None:\n    for graph_id, data in config[\"graphs\"].items():\n        if isinstance(data, dict):\n            if \"path\" not in data:\n                raise ValueError(\n                    f\"Graph '{graph_id}' must contain a 'path' key if it is a dictionary.\"\n                )\n            config[\"graphs\"][graph_id][\"path\"] = _rewrite_uv_lock_import_path(\n                config_path,\n                data[\"path\"],\n                plan,\n                label=f\"graph '{graph_id}'\",\n            )\n        elif isinstance(data, str):\n            config[\"graphs\"][graph_id] = _rewrite_uv_lock_import_path(\n                config_path,\n                data,\n                plan,\n                label=f\"graph '{graph_id}'\",\n            )\n        else:\n            raise ValueError(\n                f\"Graph '{graph_id}' must be a string or a dictionary with a 'path' key.\"","sourceCodeStart":767,"sourceCodeEnd":803,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/cli/langgraph_cli/uv_lock.py#L767-L803","documentation":"Error \"Graph '{graph_id}' must contain a 'path' key if it is a dictionary.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/cli/langgraph_cli/uv_lock.py:785 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}