MemPalace/mempalace · error · RuntimeError
_paginate_ids: offset-based pagination failed and the no-off
Error message
_paginate_ids: offset-based pagination failed and the no-offset fallback cannot advance past the first {page} results ({len(ids)} collected, collection reports {total if total is not None else 'an unreadable'} total). Refusing to return a silently truncated ID list -- investigate the collection, or use a repair mode that does not depend on offset paging (e.g. --mode from-sqlite). What it means
Error "_paginate_ids: offset-based pagination failed and the no-offset fallback cannot advance past the first {page} results ({len(ids)} collected, collection reports {total if total is not None else 'an unreadable'} total). Refusing to return a silently truncated ID list -- investigate the collection, or use a repair mode that does not depend on offset paging (e.g. --mode from-sqlite)." thrown in MemPalace/mempalace.
Source
Thrown at mempalace/repair.py:258
# HNSW-preflight-sweep work).
#
# ``col.count()`` is collection-wide and takes no ``where``
# argument, so it is only authoritative when this call is
# UNFILTERED. With a ``where`` filter, a global count > the
# collected rows does NOT prove the filtered set is truncated
# (the extra rows may belong to other wings), so we cannot use
# it as proof and treat filtered completeness as unknown
# rather than raising a false-positive truncation error.
# This raise is intentionally OUTSIDE the narrow try/except
# above so it propagates instead of being swallowed as a
# get()-failure.
if where is None and len(ids) >= page and len(r["ids"] or []) >= page:
try:
total = col.count()
except Exception:
total = None
if total is None or total > len(ids):
raise RuntimeError(
f"_paginate_ids: offset-based pagination failed "
f"and the no-offset fallback cannot advance past "
f"the first {page} results ({len(ids)} collected, "
f"collection reports "
f"{total if total is not None else 'an unreadable'} "
f"total). Refusing to return a silently truncated "
f"ID list -- investigate the collection, or use a "
f"repair mode that does not depend on offset "
f"paging (e.g. --mode from-sqlite)."
)
break
ids.extend(new_ids)
offset += len(new_ids)
continue
n = len(r["ids"]) if r["ids"] else 0
if n == 0:
break
ids.extend(r["ids"])View on GitHub (pinned to 06cb6987f0)
Solutions
- Investigate the collection, or use --mode from-sqlite which does not depend on offset paging
When it happens
Trigger: Thrown at mempalace/repair.py:258 when the library encounters an invalid state.
Common situations: Offset pagination stalled at the first page; continuing would silently drop ids.
AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15).
Data as JSON: /api/errors/07651c3fb8ab5803.
Report an issue: GitHub.