Python errors¶
Six classes cover every failure. Each core status maps to exactly one of
them; they share the base semq.errors.SemqError for callers who want one
except. Out of memory raises MemoryError; file I/O raises OSError.
| Error | Raised when | Payload |
|---|---|---|
InvalidInput |
dtype, shape, non-finite or non-unit rows, duplicate or mixed ids, non-canonical rows, config out of range, invalid manifest or floor, invalid null diff | row, field |
Incompatible |
decode, unpack, diff or concat across different configs or id kinds |
field (part index for concat) |
FormatError |
a file image is not a valid version 2 image | section, row |
IntegrityError |
a file's digest does not match its footer | which ("content" or "state") |
Unsupported |
the floating-point rounding mode is not round-to-nearest | operation |
Native |
a defect in the core or binding, or the library could not be loaded | operation, status, row, field, sdk_version, core_version, build_id |
InvalidInput
¶
InvalidInput(
message: str,
*,
row: int | None = None,
field: int | None = None
)
Bases: SemqError
An argument violates its contract.
row is the input row index when a row is at fault; field is the
coordinate, column, pair index or config field when one applies.
Incompatible
¶
Incompatible(message: str, *, field: int | None = None)
Bases: SemqError
Two states differ in config or id kind.
FormatError
¶
FormatError(
message: str,
*,
row: int | None = None,
section: int | None = None
)
Bases: SemqError
A file image is not a valid version 2 image.
section is the file section that failed; row the row index when
a row is not canonical.
IntegrityError
¶
IntegrityError(message: str, *, which: str | None = None)
Bases: SemqError
A file image's digest does not match its footer.
which names the check that failed: "content" or "state".
Unsupported
¶
Unsupported(message: str, *, operation: str | None = None)
Bases: SemqError
The operation, or the floating-point environment, is not supported.
Native
¶
Native(
message: str,
*,
operation: str | None = None,
status: int | None = None,
row: int | None = None,
field: int | None = None,
sdk_version: str = "unavailable",
core_version: str = "unavailable",
build_id: str = "unavailable"
)
Bases: SemqError
A defect in the core or the binding, or the library could not be loaded.
Carries what a bug report needs and never input data.
Reproducing a native failure¶
Include the exception's complete message, semq version output, OS and CPU
architecture, and the affected codec's backend and
codec.config.to_bytes().hex(). build_info().as_dict() identifies both the
Python package and the core actually loaded; the codec's backend identifies
the selected implementation for that operation.
For a byte discrepancy, attach a minimal input saved with
numpy.save(path, vectors, allow_pickle=False) rather than rounded decimal
text. Include IDs, their kind, manifest, expected and actual .semq files,
and how the process's FP rounding mode was set before codec construction and
encoding. Preserve the original float32 bits. A build ID is diagnostic
identity, not proof of provenance.