sentinelhub.exceptions

Module defining custom package exceptions.

exception sentinelhub.exceptions.BaseSentinelHubException[source]

Bases: Exception

A base package exception

exception sentinelhub.exceptions.DownloadFailedException(msg, *, request_exception=None)[source]

Bases: BaseSentinelHubException

General exception which is raised whenever download fails

Parameters:
  • msg (str) –

  • request_exception (requests.RequestException | None) –

Return type:

None

exception sentinelhub.exceptions.OutOfRequestsException(msg, *, request_exception=None)[source]

Bases: DownloadFailedException

An exception raised whenever download cannot be done because user has run out of requests or processing units

Parameters:
  • msg (str) –

  • request_exception (requests.RequestException | None) –

Return type:

None

exception sentinelhub.exceptions.AwsDownloadFailedException(msg, *, request_exception=None)[source]

Bases: DownloadFailedException

This exception is raised when download fails because of a missing file in AWS

Parameters:
  • msg (str) –

  • request_exception (requests.RequestException | None) –

Return type:

None

exception sentinelhub.exceptions.ImageDecodingError[source]

Bases: BaseSentinelHubException

This exception is raised when downloaded image is not properly decoded

exception sentinelhub.exceptions.MissingDataInRequestException[source]

Bases: BaseSentinelHubException

This exception is raised when an iteration is performed on a request without data.

exception sentinelhub.exceptions.HashedNameCollisionException[source]

Bases: BaseSentinelHubException

This exception is raised when two different requests are assigned the same hashed name.

exception sentinelhub.exceptions.SHDeprecationWarning[source]

Bases: DeprecationWarning

A custom deprecation warning for sentinelhub-py package

exception sentinelhub.exceptions.SHUserWarning[source]

Bases: UserWarning

A custom user warning for sentinelhub-py package

exception sentinelhub.exceptions.SHRuntimeWarning[source]

Bases: RuntimeWarning

A custom runtime warning for sentinelhub-py package

exception sentinelhub.exceptions.SHRateLimitWarning[source]

Bases: SHRuntimeWarning

A custom runtime warning in case user hit the rate limit for downloads

sentinelhub.exceptions.deprecated_function(category=<class 'sentinelhub.exceptions.SHDeprecationWarning'>, message_suffix=None)[source]

A parametrized function decorator, which signals that the function has been deprecated when called.

Has to use paranthesis even when no custom parameters are used, e.g. @deprecated_function().

Parameters:
  • category (type[DeprecationWarning]) –

  • message_suffix (str | None) –

Return type:

Callable[[Callable], Callable]

sentinelhub.exceptions.deprecated_class(category=<class 'sentinelhub.exceptions.SHDeprecationWarning'>, message_suffix=None)[source]

A parametrized class decorator, which signals that the class has been deprecated when initialized.

Has to use paranthesis even when no custom parameters are used, e.g. @deprecated_class().

Parameters:
  • category (type[DeprecationWarning]) –

  • message_suffix (str | None) –

Return type:

Callable[[type], type]