Skip to content

errors#

pyramids_eo.errors #

Exception hierarchy for pyramids-eo.

Every error raised by this package derives from EOError, so callers can catch the whole family with a single except EOError.

EOError #

Bases: Exception

Base class for all pyramids-eo errors.

Source code in src/pyramids_eo/errors.py
class EOError(Exception):
    """Base class for all pyramids-eo errors."""

ReaderError #

Bases: EOError

Raised when an instrument reader cannot decode the input.

Source code in src/pyramids_eo/errors.py
class ReaderError(EOError):
    """Raised when an instrument reader cannot decode the input."""

UnknownSensorError #

Bases: EOError

Raised when a sensor / channel is not present in the registry.

Source code in src/pyramids_eo/errors.py
class UnknownSensorError(EOError):
    """Raised when a sensor / channel is not present in the registry."""

CalibrationError #

Bases: EOError

Raised when a requested calibration is unavailable for the input.

Source code in src/pyramids_eo/errors.py
class CalibrationError(EOError):
    """Raised when a requested calibration is unavailable for the input."""

TransformError #

Bases: EOError

Raised when a spectral transform cannot be applied to the input.

Covers a requested component a sensor's table does not define, a band stack whose band count or band order does not match the sensor the transform was asked for, and an input that is not a band stack.

Source code in src/pyramids_eo/errors.py
class TransformError(EOError):
    """Raised when a spectral transform cannot be applied to the input.

    Covers a requested component a sensor's table does not define, a band stack
    whose band count or band order does not match the sensor the transform was
    asked for, and an input that is not a band stack.
    """

AuthenticationError #

Bases: EOError

Raised when provider credentials for a signed EO asset are missing or invalid.

Source code in src/pyramids_eo/errors.py
class AuthenticationError(EOError):
    """Raised when provider credentials for a signed EO asset are missing or invalid."""

ProductError #

Bases: EOError

Raised when a satellite product cannot be parsed or is malformed.

Covers a container whose subdatasets / metadata cannot be read, a requested band / resolution / tile that the product does not contain, and any other structural problem discovered while modelling the product.

Source code in src/pyramids_eo/errors.py
class ProductError(EOError):
    """Raised when a satellite product cannot be parsed or is malformed.

    Covers a container whose subdatasets / metadata cannot be read, a requested
    band / resolution / tile that the product does not contain, and any other
    structural problem discovered while modelling the product.
    """

UnsupportedProductError #

Bases: ProductError

Raised when a path is opened as a product type this package cannot model.

Distinct from ProductError: the input is a valid raster, but its GDAL driver / product family is not one the Sentinel readers understand.

Source code in src/pyramids_eo/errors.py
class UnsupportedProductError(ProductError):
    """Raised when a path is opened as a product type this package cannot model.

    Distinct from `ProductError`: the input is a valid raster, but its GDAL
    driver / product family is not one the Sentinel readers understand.
    """