{"record":{"id":"768f47128858258b","repo":"MemPalace/mempalace","slug":"embeddings-length-len-embeddings-does-not-match","errorCode":null,"errorMessage":"embeddings length {len(embeddings)} does not match ids length {len(ids)}","messagePattern":"embeddings length (.+?) does not match ids length (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mempalace/backends/milvus.py","lineNumber":497,"sourceCode":"\n    def _prepare_rows(\n        self,\n        *,\n        documents: list[str],\n        ids: list[str],\n        metadatas: Optional[list[dict]],\n        embeddings: list[list[float]],\n    ) -> tuple[list[dict], int]:\n        if len(documents) != len(ids):\n            raise ValueError(\n                f\"documents length {len(documents)} does not match ids length {len(ids)}\"\n            )\n        if metadatas is not None and len(metadatas) != len(ids):\n            raise ValueError(\n                f\"metadatas length {len(metadatas)} does not match ids length {len(ids)}\"\n            )\n        if len(embeddings) != len(ids):\n            raise ValueError(\n                f\"embeddings length {len(embeddings)} does not match ids length {len(ids)}\"\n            )\n        vectors, dimension = _normalize_vectors(embeddings)\n        metadatas = metadatas or [{} for _ in ids]\n        rows = []\n        for idx, (doc_id, document, metadata, vector) in enumerate(\n            zip(ids, documents, metadatas, vectors)\n        ):\n            if not isinstance(doc_id, str) or not doc_id:\n                raise ValueError(f\"row {idx}: id must be a non-empty string\")\n            doc_id_bytes = _utf8_len(doc_id)\n            if doc_id_bytes > DRAWER_ID_MAX_LENGTH:\n                raise ValueError(\n                    f\"row {idx}: id byte length {doc_id_bytes} exceeds {DRAWER_ID_MAX_LENGTH}\"\n                )\n            document = _clean_text(document)\n            document_bytes = _utf8_len(document)\n            if document_bytes > DOCUMENT_MAX_LENGTH:","sourceCodeStart":479,"sourceCodeEnd":515,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/backends/milvus.py#L479-L515","documentation":"Error \"embeddings length {len(embeddings)} does not match ids length {len(ids)}\" thrown in MemPalace/mempalace.","triggerScenarios":"Thrown at mempalace/backends/milvus.py:497 when the library encounters an invalid state.","commonSituations":"Embeddings were computed for a subset of ids, or ids were filtered after embedding.","solutions":["Pass one embedding vector per id; align the embeddings list with the ids list"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}