{"record":{"id":"53355c92dd44ddf1","repo":"chroma-core/chroma","slug":"groupby-keys-cannot-be-empty-53355c","errorCode":null,"errorMessage":"GroupBy keys cannot be empty","messagePattern":"GroupBy keys cannot be empty","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/execution/expression/operator.py","lineNumber":1526,"sourceCode":"        \"\"\"\n        if not isinstance(data, dict):\n            raise TypeError(f\"Expected dict for GroupBy, got {type(data).__name__}\")\n\n        # Empty dict returns default GroupBy (no grouping)\n        if not data:\n            return GroupBy()\n\n        # Non-empty dict requires keys and aggregate\n        if \"keys\" not in data:\n            raise ValueError(\"GroupBy requires 'keys' field\")\n        if \"aggregate\" not in data:\n            raise ValueError(\"GroupBy requires 'aggregate' field\")\n\n        keys = data[\"keys\"]\n        if not isinstance(keys, (list, tuple)):\n            raise TypeError(f\"GroupBy keys must be a list, got {type(keys).__name__}\")\n        if not keys:\n            raise ValueError(\"GroupBy keys cannot be empty\")\n\n        aggregate_data = data[\"aggregate\"]\n        if not isinstance(aggregate_data, dict):\n            raise TypeError(\n                f\"GroupBy aggregate must be a dict, got {type(aggregate_data).__name__}\"\n            )\n        aggregate = Aggregate.from_dict(aggregate_data)\n\n        return GroupBy(keys=_strings_to_keys(keys), aggregate=aggregate)\n","sourceCodeStart":1508,"sourceCodeEnd":1536,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/execution/expression/operator.py#L1508-L1536","documentation":"Error \"GroupBy keys cannot be empty\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/execution/expression/operator.py:1526 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":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}