Exceptions
The exceptions Chassis raises.
Each message says what was wrong, with the value, and on a line starting
help: what to do instead. Each class is also the built-in exception it is a
kind of, so except ValueError catches a bad argument and
except FileNotFoundError a missing index. code is the C API's error
code for the same error.
ChassisError
Bases: Exception
Base class of every Chassis error.
Source code in chassisdb/exceptions.py
11 12 13 14 | |
CorruptIndexError
Bases: ChassisError
The file is damaged.
Source code in chassisdb/exceptions.py
68 69 70 71 | |
DimensionMismatchError
Bases: ChassisError, ValueError
A vector or query has another number of components than the index's vectors, or the file holds vectors of other dimensions than asked for.
Source code in chassisdb/exceptions.py
24 25 26 27 28 | |
IdInUseError
Bases: ChassisError, ValueError
The id is already in use.
Source code in chassisdb/exceptions.py
50 51 52 53 | |
IndexFullError
Bases: ChassisError
The index can hold no more.
Source code in chassisdb/exceptions.py
74 75 76 77 | |
IndexLockedError
Bases: ChassisError
Another writer has the index open.
Source code in chassisdb/exceptions.py
56 57 58 59 | |
IndexNotFoundError
Bases: ChassisError, FileNotFoundError
There is no index at the path, or its directory doesn't exist.
Source code in chassisdb/exceptions.py
38 39 40 41 | |
InvalidArgumentError
Bases: ChassisError, ValueError
An argument is out of range or malformed: dimensions, an option, an id, a vector with a component that isn't a finite number.
Source code in chassisdb/exceptions.py
17 18 19 20 21 | |
InvalidPathError
Bases: ChassisError, OSError
The operating system refused: permissions, a full disk, a failed read or write.
Source code in chassisdb/exceptions.py
80 81 82 83 84 | |
NotAnIndexError
Bases: ChassisError, ValueError
The file is not a Chassis index.
Source code in chassisdb/exceptions.py
44 45 46 47 | |
NullPointerError
Bases: ChassisError
The library failed without saying why.
Source code in chassisdb/exceptions.py
87 88 89 90 | |
OptionsMismatchError
Bases: ChassisError, ValueError
The file was created with another metric, precision or max_connections than the one asked for.
Source code in chassisdb/exceptions.py
31 32 33 34 35 | |
ReadOnlyError
Bases: ChassisError
The index was opened with read_only=True, which only searches.
Source code in chassisdb/exceptions.py
62 63 64 65 | |
from_code(code, message)
The exception for a C API error code.
Source code in chassisdb/exceptions.py
111 112 113 | |