{"id":"2a20bd7614aee708","repo":"pypa/pip","slug":"dependency-groups-table-was-missing-from-path","errorCode":null,"errorMessage":"[dependency-groups] table was missing from '{path}'. Cannot resolve '--group' option.","messagePattern":"\\[dependency-groups\\] table was missing from '(.+?)'\\. Cannot resolve '--group' option\\.","errorType":"exception","errorClass":"InstallationError","httpStatus":null,"severity":"error","filePath":"src/pip/_internal/req/req_dependency_group.py","lineNumber":49,"sourceCode":"            yield from (str(req) for req in resolver.resolve(groupname))\n        except ExceptionGroup as eg:\n            # Convert ExceptionGroup to a single InstallationError with all messages\n            messages = [str(e) for e in eg.exceptions]\n            raise InstallationError(\n                f\"[dependency-groups] resolution failed for '{groupname}' \"\n                f\"from '{path}': {'; '.join(messages)}\"\n            ) from eg\n\n\ndef _build_resolvers(paths: Iterable[str]) -> dict[str, Any]:\n    resolvers = {}\n    for path in paths:\n        if path in resolvers:\n            continue\n\n        pyproject = _load_pyproject(path)\n        if \"dependency-groups\" not in pyproject:\n            raise InstallationError(\n                f\"[dependency-groups] table was missing from '{path}'. \"\n                \"Cannot resolve '--group' option.\"\n            )\n        raw_dependency_groups = pyproject[\"dependency-groups\"]\n        if not isinstance(raw_dependency_groups, dict):\n            raise InstallationError(\n                f\"[dependency-groups] table was malformed in {path}. \"\n                \"Cannot resolve '--group' option.\"\n            )\n\n        try:\n            resolvers[path] = DependencyGroupResolver(raw_dependency_groups)\n        except ExceptionGroup as eg:\n            # Handle ExceptionGroup from resolver initialization\n            messages = [str(e) for e in eg.exceptions]\n            raise InstallationError(\n                f\"[dependency-groups] data was invalid in {path}: {'; '.join(messages)}\"\n            ) from eg","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/pypa/pip/blob/d7d0d0a39494e28ec1c407bd0680e4a4d1067791/src/pip/_internal/req/req_dependency_group.py#L31-L67","documentation":"Raised by _build_resolvers() when the pyproject.toml referenced by a `--group` option does not contain a `[dependency-groups]` table at all (req_dependency_group.py:48). pip checks `'dependency-groups' not in pyproject`; if absent, it cannot resolve any group because there is nothing to resolve from.","triggerScenarios":"Running `pip install --group dev` against a project whose pyproject.toml has no [dependency-groups] section. Or passing a path (`path:group`) to a pyproject.toml that lacks the table.","commonSituations":"Expecting a group that was never defined. Working in a project that uses the older extras-dev pattern instead of PEP 735 groups. Typing the group name of a different project. CI that assumes groups exist after a partial migration.","solutions":["Open the relevant pyproject.toml and add a [dependency-groups] table listing the groups you need.","Confirm you are pointing at the correct pyproject.toml path (especially with the `path:group` CLI syntax).","If the project hasn't adopted PEP 735, either add the table or use a different mechanism (extras, requirements files).","Verify the table key is exactly `dependency-groups` (hyphenated, plural)."],"exampleFix":"# before (no table in pyproject.toml)\n# pip install --group dev  -> error\n# after\n[dependency-groups]\ndev = [\"pytest\", \"ruff\"]","handlingStrategy":"validation","validationCode":"import tomllib\n\ndef assert_has_dependency_groups(path: str) -> None:\n    with open(path, \"rb\") as f:\n        data = tomllib.load(f)\n    if \"dependency-groups\" not in data:\n        raise ValueError(f\"{path} has no [dependency-groups] table; cannot use --group\")","typeGuard":"import tomllib\n\ndef pyproject_has_dependency_groups(path: str) -> bool:\n    with open(path, \"rb\") as f:\n        return \"dependency-groups\" in tomllib.load(f)","tryCatchPattern":"null","preventionTips":["Confirm [dependency-groups] exists before using --group.","Use the exact key `dependency-groups` (hyphenated, plural).","Verify you're pointing at the right pyproject.toml when using path:group syntax."],"tags":["dependency-groups","pep735","toml","packaging"],"analyzedSha":"d7d0d0a39494e28ec1c407bd0680e4a4d1067791","analyzedAt":"2026-08-04T20:55:04.259Z","schemaVersion":2}