RyanCodrai/turbovec · error · ValueError
No path to save to. Pass `folder_path=` here or set `path=`
Error message
No path to save to. Pass `folder_path=` here or set `path=` on the constructor.
What it means
Raised in TurboQuantVectorDb.save when neither the folder_path argument nor the constructor's path= was provided, so there is no destination directory for the index.tvim / docstore.json pair. It fires before any I/O; the store simply has no configured persistence location.
Source
Thrown at turbovec-python/python/turbovec/agno.py:1170
else:
data["filters"] = dict(metadata)
# ---- Persistence (JSON side-car) --------------------------------------
def save(self, folder_path: Optional[str] = None) -> None:
"""Persist the quantized index plus a JSON side-car to disk. Pass
``folder_path`` to override the constructor's ``path=``.
Writes two files under ``folder_path``:
- ``index.tvim`` — the :class:`IdMapIndex` payload.
- ``docstore.json`` — JSON-encoded document text, metadata, and
id maps. Side-car carries a ``schema_version`` field; loaders
reject unknown versions rather than silently misinterpreting
bytes.
"""
path = folder_path if folder_path is not None else self.path
if path is None:
raise ValueError(
"No path to save to. Pass `folder_path=` here or set "
"`path=` on the constructor."
)
if self._index is None:
raise RuntimeError(
"TurboQuantVectorDb has no index to save — call create() first."
)
folder = Path(path)
folder.mkdir(parents=True, exist_ok=True)
# Serializes with writers: snapshotting the maps and the index
# concurrently with a write would persist a torn store to disk.
# Reads may proceed while a save runs.
with self._write_lock:
payload = {
"schema_version": _DOCSTORE_SCHEMA_VERSION,
# Round-trip int handles via list-of-pairs (JSON keys must be
# strings, but our handles are ints).
"u64_to_doc": [[h, d] for h, d in self._u64_to_doc.items()],View on GitHub (pinned to ccab9f325e)
Solutions
- Call save(folder_path='/path/to/dir') with an explicit destination.
- Re-construct the store with path='/path/to/dir' so save() has a default location.
- Catch the ValueError in persistence glue code to report the missing configuration instead of crashing.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at turbovec-python/python/turbovec/agno.py:1170 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of RyanCodrai/turbovec@ccab9f325e (2026-09-06).
Data as JSON: /api/errors/66309fb4405aef2f.
Report an issue: GitHub.