{"record":{"id":"a5f40b6648704a17","repo":"chroma-core/chroma","slug":"no-such-key-key-valid-keys-are-self-get-mode","errorCode":null,"errorMessage":"No such key: {key}, valid keys are: {self.get_model_fields()}","messagePattern":"No such key: (.+?), valid keys are: (.+?)","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"chromadb/types.py","lineNumber":136,"sourceCode":"    def __getitem__(self, key: str) -> Optional[Any]:\n        \"\"\"Allows the collection to be treated as a dictionary\"\"\"\n        if key == \"configuration\":\n            return self.get_configuration()\n        # For the other model attributes we allow the user to access them directly\n        if key in self.get_model_fields():\n            return getattr(self, key)\n        return None\n\n    # TODO: This doesn't check types.\n    def __setitem__(self, key: str, value: Any) -> None:\n        \"\"\"Allows the collection to be treated as a dictionary\"\"\"\n        # For the model attributes we allow the user to access them directly\n        if key == \"configuration\":\n            self.set_configuration(value)\n        if key in self.get_model_fields():\n            setattr(self, key, value)\n        else:\n            raise KeyError(\n                f\"No such key: {key}, valid keys are: {self.get_model_fields()}\"\n            )\n\n    def __eq__(self, __value: object) -> bool:\n        # Check that all the model fields are equal\n        if not isinstance(__value, Collection):\n            return False\n        for field in self.get_model_fields():\n            if getattr(self, field) != getattr(__value, field):\n                return False\n        return True\n\n    def get_configuration(self) -> CollectionConfiguration:\n        \"\"\"Returns the configuration of the collection\"\"\"\n        try:\n            return load_collection_configuration_from_json(self.configuration_json)\n        except Exception as e:\n            raise ValueError(","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/types.py#L118-L154","documentation":"Error \"No such key: {key}, valid keys are: {self.get_model_fields()}\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/types.py:136 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"}