{"record":{"id":"ee3d73c0ab653fff","repo":"chroma-core/chroma","slug":"record-does-not-contain-any-non-none-fields-that-c","errorCode":null,"errorMessage":"Record does not contain any non-None fields that can be embedded.Embeddable Fields: {embeddable_fields}Record Fields: {record_set}","messagePattern":"Record does not contain any non-None fields that can be embedded\\.Embeddable Fields: (.+?)Record Fields: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/api/models/CollectionCommon.py","lineNumber":740,"sourceCode":"\n        for field in embeddable_fields:\n            if record_set[field] is not None:  # type: ignore[literal-required]\n                # uris require special handling\n                if field == \"uris\":\n                    if self._data_loader is None:\n                        raise ValueError(\n                            \"You must set a data loader on the collection if loading from URIs.\"\n                        )\n                    return self._embed(\n                        input=self._data_loader(uris=cast(URIs, record_set[field])),  # type: ignore[literal-required]\n                        is_query=is_query,\n                    )\n                else:\n                    return self._embed(\n                        input=record_set[field],  # type: ignore[literal-required]\n                        is_query=is_query,\n                    )\n        raise ValueError(\n            \"Record does not contain any non-None fields that can be embedded.\"\n            f\"Embeddable Fields: {embeddable_fields}\"\n            f\"Record Fields: {record_set}\"\n        )\n\n    def _embed(self, input: Any, is_query: bool = False) -> Embeddings:\n        if self._embedding_function is not None and not isinstance(\n            self._embedding_function, DefaultEmbeddingFunction\n        ):\n            if is_query:\n                return self._embedding_function.embed_query(input=input)\n            else:\n                return self._embedding_function(input=input)\n\n        config_ef = self.configuration.get(\"embedding_function\")\n        if config_ef is not None:\n            if is_query:\n                return config_ef.embed_query(input=input)","sourceCodeStart":722,"sourceCodeEnd":758,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/api/models/CollectionCommon.py#L722-L758","documentation":"`_embed_fields` walks the embeddable fields (documents, uris, schema text fields) looking for the first non-None one to embed. If every embeddable field in the record set is None, there is nothing to embed and the request is rejected. The message lists the embeddable fields it tried and the full record set for diagnosis.","triggerScenarios":"`collection.upsert`/`add`/`query` with records that contain only ids and/or metadata — documents=None, uris=None, and no schema text fields populated.","commonSituations":"Building records dynamically where the documents field is dropped or named incorrectly; sending id/metadata-only records expecting server-side embedding of nothing.","solutions":["Include at least one embeddable field per record (documents, uris with a data loader, or a schema text field)","Pass precomputed embeddings if you do not want client-side embedding","Log/inspect the record set before sending: assert at least one embeddable key is non-None"],"exampleFix":"# before\ncol.upsert(records={\"ids\": [\"1\"], \"documents\": [None]})  # nothing embeddable\n\n# after\ncol.upsert(records={\"ids\": [\"1\"], \"documents\": [\"hello world\"]})","handlingStrategy":"validation","validationCode":"EMBEDDABLE = (\"documents\", \"uris\")\nhas_content = any(records.get(f) is not None for f in EMBEDDABLE) or bool(schema_text_fields & set(records))\nif not has_content:\n    raise ValueError(\"records need documents/uris (or embeddings) to upsert\")\ncollection.upsert(records=records)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate record dicts for at least one non-None embeddable field before sending","Watch for None placeholders ('documents': [None]) — they count as missing","When embedding nothing is intended, pass precomputed embeddings explicitly"],"tags":["embeddings","upsert","input-validation","empty-input"],"backgroundTag":"missing-required-parameter","analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}