pystac.errors#

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: Union[str, Any], prop: str, msg: Optional[str] = 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.STACTypeError[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: Optional[Any] = 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.