{"record":{"id":"9d679e088e6fd48f","repo":"chroma-core/chroma","slug":"limit-must-be-a-limit-object-dict-int-or-none","errorCode":null,"errorMessage":"limit must be a Limit object, dict, int, or None, got {type(limit).__name__}","messagePattern":"limit must be a Limit object, dict, int, or None, got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"chromadb/execution/expression/plan.py","lineNumber":140,"sourceCode":"            self._group_by = group_by\n        elif isinstance(group_by, dict):\n            self._group_by = GroupBy.from_dict(group_by)\n        else:\n            raise TypeError(\n                f\"group_by must be a GroupBy object, dict, or None, got {type(group_by).__name__}\"\n            )\n\n        # Handle limit parameter\n        if limit is None:\n            self._limit = Limit()\n        elif isinstance(limit, Limit):\n            self._limit = limit\n        elif isinstance(limit, int):\n            self._limit = Limit.from_dict({\"limit\": limit, \"offset\": 0})\n        elif isinstance(limit, dict):\n            self._limit = Limit.from_dict(limit)\n        else:\n            raise TypeError(\n                f\"limit must be a Limit object, dict, int, or None, got {type(limit).__name__}\"\n            )\n\n        # Handle select parameter\n        if select is None:\n            self._select = Select()\n        elif isinstance(select, Select):\n            self._select = select\n        elif isinstance(select, dict):\n            self._select = Select.from_dict(select)\n        elif isinstance(select, (list, set)):\n            # Convert list/set of strings to Select object\n            self._select = Select.from_dict({\"keys\": list(select)})\n        else:\n            raise TypeError(\n                f\"select must be a Select object, dict, list, set, or None, got {type(select).__name__}\"\n            )\n","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/execution/expression/plan.py#L122-L158","documentation":"Error \"limit must be a Limit object, dict, int, or None, got {type(limit).__name__}\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/execution/expression/plan.py:140 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"}