{"record":{"id":"79e45fccde22e5fa","repo":"chroma-core/chroma","slug":"expected-dict-for-select-got-type-data-name","errorCode":null,"errorMessage":"Expected dict for Select, got {type(data).__name__}","messagePattern":"Expected dict for Select, got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"chromadb/execution/expression/operator.py","lineNumber":1286,"sourceCode":"        key_strings = []\n        for k in self.keys:\n            if isinstance(k, Key):\n                key_strings.append(k.name)\n            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)","sourceCodeStart":1268,"sourceCodeEnd":1304,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/execution/expression/operator.py#L1268-L1304","documentation":"Error \"Expected dict for Select, got {type(data).__name__}\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/execution/expression/operator.py:1286 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"}