run-llama/llama_index · error · ValueError
No existing {__name__} found at {persist_path}, skipping loa
Error message
No existing {__name__} found at {persist_path}, skipping load. What it means
Raised by `SimpleVectorStore.from_persist_path()` when the given persist file does not exist on the provided (or default local) filesystem. The classmethod checks `fs.exists(persist_path)` before opening, and the error message interpolates the module-level `__name__` plus the path. Note the message says 'skipping load' but the code actually raises — the intent is that the caller must create/persist the store first or fix the path.
Source
Thrown at llama-index-core/llama_index/core/vector_stores/simple.py:338
fs: Optional[fsspec.AbstractFileSystem] = None,
) -> None:
"""Persist the SimpleVectorStore to a directory."""
fs = fs or self._fs
dirpath = os.path.dirname(persist_path)
if not fs.exists(dirpath):
fs.makedirs(dirpath)
with fs.open(persist_path, "w", encoding="utf-8") as f:
json.dump(self.data.to_dict(), f)
@classmethod
def from_persist_path(
cls, persist_path: str, fs: Optional[fsspec.AbstractFileSystem] = None
) -> "SimpleVectorStore":
"""Create a SimpleKVStore from a persist directory."""
fs = fs or fsspec.filesystem("file")
if not fs.exists(persist_path):
raise ValueError(
f"No existing {__name__} found at {persist_path}, skipping load."
)
logger.debug(f"Loading {__name__} from {persist_path}.")
with fs.open(persist_path, "rb") as f:
data_dict = json.load(f)
data = SimpleVectorStoreData.from_dict(data_dict)
return cls(data)
@classmethod
def from_dict(cls, data: Dict[str, Any], **kwargs: Any) -> "SimpleVectorStore":
save_data = SimpleVectorStoreData.from_dict(data)
return cls(save_data)
def to_dict(self, **kwargs: Any) -> Dict[str, Any]:
return self.data.to_dict()
View on GitHub (pinned to afd0fef371)
Solutions
- Run the ingestion/persist step first so the file exists (`index.storage_context.persist()` or `store.persist(path)`).
- Verify the path: use an absolute path or `os.path.abspath`, and confirm the file exists with `os.path.exists` / `fs.exists`.
- If a missing store is expected (fresh deploy), branch on existence and build a new store instead of loading.
- For remote filesystems, double-check the fsspec path format (e.g. bucket/key spelled per the fs's convention).
Example fix
# before
store = SimpleVectorStore.from_persist_path("storage/vector_store.json") # raises on first run
# after
import os
if os.path.exists(p):
store = SimpleVectorStore.from_persist_path(p)
else:
store = SimpleVectorStore() # build fresh; persist after ingestion Defensive patterns
Strategy: try-catch
Validate before calling
import os
def load_store_or_none(path: str):
if not os.path.exists(path):
return None
return SimpleVectorStore.from_persist_path(path) Try / catch
try:
store = SimpleVectorStore.from_persist_path(p)
except ValueError as e:
if "No existing" in str(e):
store = SimpleVectorStore() # first run: build fresh
else:
raise Prevention
- Check fs.exists(persist_path) before loading, especially with relative paths.
- Use absolute paths derived from a single config value.
- Order pipelines so ingestion/persist always runs before query-only jobs.
When it happens
Trigger: Calling `SimpleVectorStore.from_persist_path("./storage/vector_store.json")` (or a custom path/fs) when the file was never created — e.g. running a query-only script before the ingestion script, wrong working directory, typo in the path, or a remote fsspec filesystem where the file lives elsewhere.
Common situations: Splitting ingestion and querying into separate processes where the query job runs first; relative paths resolved against a different CWD (note the default is `os.path.join(DEFAULT_PERSIST_DIR, ...)`); CI or fresh containers that mount storage incorrectly; passing an fsspec URL/path mismatch for S3/GCS filesystems.
Related errors
- Cannot filter stores that were persisted without metadata. P
- Node content not found in metadata dict.
- SimpleVectorStore does not store nodes directly.
- Invalid query mode: {query.mode}
- Vector Store only supports exact match filters. Please use E
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/fc6572e3e2d53027.
Report an issue: GitHub.