Exceptions¶
All abovepy exceptions inherit from AbovepyError, so you can catch
any library error with a single handler:
from abovepy import AbovepyError
try:
tiles = abovepy.search(county="Nonexistent", product="dem_phase3")
except AbovepyError as e:
print(f"abovepy error: {e}")
Exceptions that replaced ValueError also inherit from ValueError
for backward compatibility.
Custom exception hierarchy for abovepy.
All abovepy exceptions inherit from AbovepyError so users can
except AbovepyError to catch any library-specific failure.
Exceptions that replace ValueError also inherit from ValueError
for backward compatibility with existing except ValueError handlers.
AbovepyError
¶
Bases: Exception
Base exception for all abovepy errors.
SearchError
¶
Bases: AbovepyError
Raised when a STAC search fails after retries.
DownloadError
¶
Bases: AbovepyError
Raised when a tile download fails.
ReadError
¶
Bases: AbovepyError
Raised when reading a raster or point cloud fails.
MosaicError
¶
Bases: AbovepyError
Raised when mosaicking tiles fails.
ProductError
¶
Bases: AbovepyError, ValueError
Raised for invalid product keys.
Inherits ValueError for backward compatibility.
CountyError
¶
Bases: AbovepyError, ValueError
Raised for invalid county names.
Inherits ValueError for backward compatibility.
BboxError
¶
Bases: AbovepyError, ValueError
Raised for invalid bounding boxes.
Inherits ValueError for backward compatibility.