{"record":{"id":"68eff62a98b3159f","repo":"chroma-core/chroma","slug":"select-keys-must-be-a-list-tuple-set-got-type-ke","errorCode":null,"errorMessage":"Select keys must be a list/tuple/set, got {type(keys).__name__}","messagePattern":"Select keys must be a list/tuple/set, got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"chromadb/execution/expression/operator.py","lineNumber":1290,"sourceCode":"            else:\n                key_strings.append(k)\n        # Remove duplicates while preserving order\n        return {\"keys\": list(dict.fromkeys(key_strings))}\n\n    @staticmethod\n    def from_dict(data: Dict[str, Any]) -> \"Select\":\n        \"\"\"Create Select from dictionary.\n\n        Examples:\n        - {\"keys\": [\"#document\", \"#score\"]} -> Select(keys={Key.DOCUMENT, Key.SCORE})\n        - {\"keys\": [\"title\", \"author\"]} -> Select(keys={\"title\", \"author\"})\n        \"\"\"\n        if not isinstance(data, dict):\n            raise TypeError(f\"Expected dict for Select, got {type(data).__name__}\")\n\n        keys = data.get(\"keys\", [])\n        if not isinstance(keys, (list, tuple, set)):\n            raise TypeError(\n                f\"Select keys must be a list/tuple/set, got {type(keys).__name__}\"\n            )\n\n        # Validate and convert each key\n        key_list = []\n        for k in keys:\n            if not isinstance(k, str):\n                raise TypeError(f\"Select key must be a string, got {type(k).__name__}\")\n\n            # Map special keys to Key instances\n            if k == \"#id\":\n                key_list.append(Key.ID)\n            elif k == \"#document\":\n                key_list.append(Key.DOCUMENT)\n            elif k == \"#embedding\":\n                key_list.append(Key.EMBEDDING)\n            elif k == \"#metadata\":\n                key_list.append(Key.METADATA)","sourceCodeStart":1272,"sourceCodeEnd":1308,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/execution/expression/operator.py#L1272-L1308","documentation":"Error \"Select keys must be a list/tuple/set, got {type(keys).__name__}\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/execution/expression/operator.py:1290 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"}