MemPalace/mempalace · error · RebuildPartialError
Upsert failed in collection {collection_name!r} after {upser
Error message
Upsert failed in collection {collection_name!r} after {upserted} rows: {exc!r} What it means
Error "Upsert failed in collection {collection_name!r} after {upserted} rows: {exc!r}" thrown in MemPalace/mempalace.
Source
Thrown at mempalace/repair.py:1458
_flush()
except Exception as exc: # noqa: BLE001 — chromadb raises many shapes
partial = dict(counts_so_far)
partial[collection_name] = upserted
msg_parts = [
f"Upsert failed in collection {collection_name!r} after {upserted} rows: {exc!r}",
f"Partial palace left at: {dest_palace}",
]
if archive_path is not None:
msg_parts.append(f"Original palace archived at: {archive_path}")
msg_parts.append(
" Recover by removing the partial dest and re-running with "
f"--source {archive_path}"
)
else:
msg_parts.append(" Source palace is unchanged. Remove the partial dest and re-run.")
message = "\n ".join(msg_parts)
print(f"\n ERROR: {message}")
raise RebuildPartialError(
message,
partial_counts=partial,
failed_collection=collection_name,
dest_palace=dest_palace,
archive_path=archive_path,
) from exc
return upserted
def extract_via_sqlite(palace_path: str, collection_name: str) -> Iterator[tuple[str, str, dict]]:
"""Yield ``(embedding_id, document, metadata)`` for every row in
``collection_name``'s metadata segment by reading ``chroma.sqlite3``
directly.
Bypasses the chromadb client entirely — never opens a
``PersistentClient``, never imports hnswlib, never invokes the
HNSW segment writer. This is the recovery path for palaces whereView on GitHub (pinned to 06cb6987f0)
Solutions
- Inspect the underlying upsert error; the partial batch was already applied, re-run to continue
When it happens
Trigger: Thrown at mempalace/repair.py:1458 when the library encounters an invalid state.
Common situations: Upsert failed mid-batch during repair re-upload.
AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15).
Data as JSON: /api/errors/45020fa1ade2bb79.
Report an issue: GitHub.