Raster errors and execution receipts#

Raster reports an exception category, a native status where available, and operation-specific diagnostics. These are separate lookups: a route describes how work ran, while a receipt describes what the operation recorded. Use exception type and retained code for handling. Native diagnostic text can be truncated.

Exception types#

The public exception and warning exports are listed in errors.py. Their definitions and inheritance are in the boundary error definitions.

Catch or inspect

Base and use

CugeoRasterError

RuntimeError base for cuGeo Raster failures. Inspect code and context when supplied.

RasterioError

Raster I/O family base.

RasterIOError, RasterioIOError

The two names refer to the same class, derived from RasterioError and OSError. Inspect the failed I/O operation and underlying storage.

CRSError, RPCError

Also derive from ValueError. Inspect the coordinate system or RPC metadata.

WindowError, WindowEvaluationError

Inspect window syntax, geometry and evaluation inputs. WindowEvaluationError also derives from ValueError.

DatasetIOShapeError

A RasterioError. Inspect the requested and supplied output shapes.

UnsupportedError

The unsupported-capability base.

UnsupportedOperation

Both UnsupportedError and RasterioError. Inspect the requested operation and route.

WarpOptionsError, WarpOperationError

RasterioError subclasses. Inspect warp options or the failed warp operation.

DriverCapabilityError

Also an UnsupportedError, RasterioError and ValueError. Inspect the driver and requested capability.

ResourceLimitError

Inspect the request and available capacity. Native resource-limit status is 8.

NotGeoreferencedWarning signals missing georeferencing. NodataShadowWarning signals that nodata masks shadow an alpha band. Both are UserWarning subclasses.

Native status codes#

Code

Status

What to inspect

0

Success

The operation’s result and receipt.

1

Invalid argument

The inputs and operation context.

2

Unsupported

The requested capability and selected route. Native JPEG 2000 rejection maps to this status.

3

Buffer error

The supplied buffer and its requirements.

4

I/O error

The source or target and failed I/O stage.

5

CUDA unavailable

CUDA availability and the operation’s requirements.

6

CUDA error

The CUDA operation and its context.

7

WouldBlock

The operation’s readiness and its own retry rules.

8

ResourceLimit

The request and available capacity.

255

Internal

An internal failure. A contained native panic returns this status.

Python preserves native codes on failures where the boundary supplies them. A class can be refined at an operation boundary, so inspect both the class and code. For JPEG 2000 route reasons and their receipt fields, see Input formats and execution routes.

Receipts and partial results#

Start with the result type and operation before interpreting a field. The public diagnostics exports, Python receipt declarations, and native Raster interface provide the complete declarations.

Receipt or result

Useful lookup

DatasetReadReceipt

route, storage, parser, codec, source window and bands identify the read. Output shape, layout and residency describe its result. Byte fields distinguish storage, decoded and logical output bytes, caller and allocated output, transfers and scratch capacity. Timing fields include total_time_ns and, when available, host_controller_wait_ns. synchronized and wait_count describe synchronization.

DatasetWriteReceipt

Identifies the driver, backend and container, logical, encoded, metadata and file bytes, mask work, transfers, timing, and whether the result was reopened and atomically published. Its budget records the write budget.

ReadBatchReceipt and typed request results

Inspect the individual request result first when a batch partially fails, then interpret its status and the batch receipt. A batch error can carry outputs, results and receipt.

Orthorectification receipts

File-open and window records, planned and actual allocation, timing, host or device execution, completion and tile failures have distinct scopes. V2 device execution records extend the execution information. Caller-supplied CUDA arena and output descriptors are explicit. See the receipt definitions.

Operation result and pixel status

Decode a pixel status under the operation that produced it. For a height-model coordinate failure, use the vertical-reference lookup in RPCs, terrain and output coverage.

For DatasetReadReceipt, None means unmeasured or unavailable from the selected backend. In particular, an unavailable transfer count leaves the number of bytes unknown. Byte counts and capacity fields describe different things. Do not interpret a capacity as measured transfer or allocation. Some aggregate memory accounting is an upper bound, as indicated by memory_accounting.

Target state and retry#

Operation and failure stage

Target state or next step

Prepared CUDA writer, final mask verification fails on close()

The existing target is preserved. A second close() reports the same failure. It does not turn that failure into a successful publication.

Prepared JPEG 2000 close fails during retryable teardown

Follow that operation’s teardown and readiness rules before retrying. Do not assume every close failure is retryable. For the partitioned event-destruction case and conditions for releasing the retained pool and owners, see Streaming, memory and output contracts.

If cleanup fails while another exception is already being handled, the primary exception remains primary. Cleanup details can be attached to it. Inspect the operation-specific result and receipt before deciding whether output is usable or a retry is appropriate.