{"record":{"id":"b8c1d860272e3703","repo":"chroma-core/chroma","slug":"where-must-be-a-where-object-dict-or-none-got","errorCode":null,"errorMessage":"where must be a Where object, dict, or None, got {type(where).__name__}","messagePattern":"where must be a Where object, dict, or None, got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"chromadb/execution/expression/plan.py","lineNumber":102,"sourceCode":"                  Note: Primitive numbers are not accepted - use {\"$val\": number} for constant ranks\n            group_by: GroupBy configuration for grouping and aggregating results (defaults to None)\n                      Dict will be converted using GroupBy.from_dict()\n            limit: Limit configuration for pagination (defaults to no limit)\n                   Can be a Limit object, a dict for Limit.from_dict(), or an int\n                   When passing an int, it creates Limit(limit=value, offset=0)\n            select: Select configuration for keys (defaults to empty selection)\n                    Can be a Select object, a dict for Select.from_dict(),\n                    or a list/set of strings (e.g., [\"#document\", \"#score\"])\n        \"\"\"\n        # Handle where parameter\n        if where is None:\n            self._where = None\n        elif isinstance(where, Where):\n            self._where = where\n        elif isinstance(where, dict):\n            self._where = Where.from_dict(where)\n        else:\n            raise TypeError(\n                f\"where must be a Where object, dict, or None, got {type(where).__name__}\"\n            )\n\n        # Handle rank parameter\n        if rank is None:\n            self._rank = None\n        elif isinstance(rank, Rank):\n            self._rank = rank\n        elif isinstance(rank, dict):\n            self._rank = Rank.from_dict(rank)\n        else:\n            raise TypeError(\n                f\"rank must be a Rank object, dict, or None, got {type(rank).__name__}\"\n            )\n\n        # Handle group_by parameter\n        if group_by is None:\n            self._group_by = GroupBy()","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/execution/expression/plan.py#L84-L120","documentation":"Error \"where must be a Where object, dict, or None, got {type(where).__name__}\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/execution/expression/plan.py:102 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"}