localvectordb.exceptions module
- exception localvectordb.exceptions.BaseLocalVectorDBException
Bases:
ExceptionBase class for all LocalVectorDB exceptions.
- exception localvectordb.exceptions.DatabaseError
Bases:
BaseLocalVectorDBExceptionRaised for general database operation failures.
- exception localvectordb.exceptions.DatabaseNotFoundError
Bases:
DatabaseError,KeyErrorRaised if the Database cannot be found
- exception localvectordb.exceptions.MetadataFilterError
Bases:
DatabaseError,ValueErrorRaised when there’s an error in metadata filter specification or processing
- exception localvectordb.exceptions.DuplicateDocumentIDError
Bases:
DatabaseError,ValueErrorRaised when inserting document(s) and the id(s) already exist
- exception localvectordb.exceptions.IndexIntegrityError
Bases:
DatabaseErrorRaised when the SQLite rows and the FAISS index disagree in a way that corrupts query results – notably duplicate
faiss_idvalues, which cause one vector to be attributed to two different documents.Recover with
lvdb db <name> repair.
- exception localvectordb.exceptions.UnsupportedIndexOperationError
Bases:
DatabaseErrorRaised when an operation is not supported by the configured FAISS index type.
Most commonly:
IndexHNSWFlatcannot remove vectors, so documents cannot be deleted or replaced in a database backed by it.
- exception localvectordb.exceptions.DocumentNotFoundError(message: str, missing_ids: str | List[str] | None = None)
Bases:
DatabaseError,KeyErrorRaised when one or more requested documents cannot be found
- exception localvectordb.exceptions.PatchConflictError(message: str, expected: str | None = None, actual: str | None = None)
Bases:
DatabaseErrorRaised when a document patch’s
expect_hashprecondition does not match the storedcontent_hash– i.e. the document changed since the caller read it.This is a distinct outcome from “document not found” and “no-op”: the document exists and the ops are valid, but applying them would clobber a concurrent write. Surfaces as HTTP 409 on the server.
- exception localvectordb.exceptions.PatchError
Bases:
DatabaseError,ValueErrorRaised when a document patch’s ops cannot be applied: an unmatched or ambiguous
find, an out-of-range or overlapping splice, or a malformed op.The whole patch fails atomically – no partial write. Surfaces as HTTP 422 on the server.
- exception localvectordb.exceptions.EmbeddingError
Bases:
BaseLocalVectorDBException,RuntimeErrorRaised when an embedding provider fails to generate embeddings.
- exception localvectordb.exceptions.OllamaNotFoundError
Bases:
EmbeddingErrorRaised when Ollama is not installed or not running.
- exception localvectordb.exceptions.ConfigurationError
Bases:
BaseLocalVectorDBException,RuntimeErrorRaised when configuration is invalid or inconsistent.
- exception localvectordb.exceptions.ValidationError
Bases:
BaseLocalVectorDBException,ValueErrorRaised when there’s a validation error in input data
- exception localvectordb.exceptions.ConnectionPoolError
Bases:
BaseLocalVectorDBExceptionRaised when a database connection cannot be acquired from the pool.
- exception localvectordb.exceptions.RerankerError
Bases:
BaseLocalVectorDBException,RuntimeErrorRaised when there’s an error in reranking operations.
- exception localvectordb.exceptions.CursorError
Bases:
BaseLocalVectorDBExceptionBase class for cursor-related errors.
- exception localvectordb.exceptions.CursorExpiredError
Bases:
CursorErrorRaised when a cursor has expired or been closed.
- exception localvectordb.exceptions.CursorExhaustedError
Bases:
CursorErrorRaised when attempting to fetch from an exhausted cursor.