pystac.errors#

exception pystac.errors.DeprecatedWarning[source]

Issued when converting a dictionary to a STAC Item or Collection and the version extension deprecated field is present and set to True.

exception pystac.errors.DuplicateObjectKeyError[source]

Raised when deserializing a JSON object containing a duplicate key.

exception pystac.errors.ExtensionAlreadyExistsError[source]

An ExtensionAlreadyExistsError is raised when extension hooks are registered with PySTAC if there are already hooks registered for an extension with the same ID.

exception pystac.errors.ExtensionNotImplemented[source]

Attempted to extend a STAC object that does not implement the given extension.

exception pystac.errors.ExtensionTypeError[source]

An ExtensionTypeError is raised when an extension is used against an object that the extension does not apply to

exception pystac.errors.RequiredPropertyMissing(obj: str | Any, prop: str, msg: str | None = None)[source]

This error is raised when a required value was expected to be there but was missing or None. This will happen, for example, in an extension that has required properties, where the required property is missing from the extended object

Parameters:
  • obj – Description of the object that will have a property missing. Should include a __repr__ that identifies the object for the error message, or be a string that describes the object.

  • prop – The property that is missing

exception pystac.errors.STACError[source]

A STACError is raised for errors relating to STAC, e.g. for invalid formats or trying to operate on a STAC that does not have the required information available.

exception pystac.errors.STACLocalValidationError[source]

Schema not available locally

exception pystac.errors.STACTypeError(bad_dict: dict[str, Any], expected: type, extra_message: str | None = '')[source]

A STACTypeError is raised when encountering a representation of a STAC entity that is not correct for the context; for example, if a Catalog JSON was read in as an Item.

exception pystac.errors.STACValidationError(message: str, source: Any | None = None)[source]

Represents a validation error. Thrown by validation calls if the STAC JSON is invalid.

Parameters:

source – Source of the exception. Type will be determined by the validation implementation. For the default JsonSchemaValidator this will a the jsonschema.ValidationError.

exception pystac.errors.TemplateError[source]

Exception thrown when an error occurs during converting a template string into data for LayoutTemplate