All docs
Errors·
error
Errors.SchemaError
signals a step's output not matching its declared output_schema
Python
SchemaError(message: str)
Parameters#
| name | type | default | description |
|---|---|---|---|
message |
str |
— | human-readable description of the schema mismatch |
Example#
Python
from lsdtools import SchemaError
try:
engine.run(clean(t=raw))
except SchemaError as e:
print("output schema drift:", e)
Raise one from a step when the contract is broken:
Python
raise SchemaError("expected column 'score' (int64), got string")
Notes#
Subclass of ValueError, so except ValueError catches it too. It is raised at run time — when
a step's produced Arrow table does not match the output_schema it declared — not at import or load.
It marks a contract violation between what a step promised (its declared schema) and what its
run() actually returned.
See also#
API: ValidationError · Errors · Tool
Guides: Shape steps · Package anatomy
By LSD Team · Last updated Jul 17, 2026
Ask on Discord
View as Markdown