gedih3.exceptions#
gedih3 Exception Hierarchy
Custom exceptions for structured error handling throughout the package. All exceptions inherit from GediError for easy catching of package-specific errors.
- Usage:
from gedih3.exceptions import GediDownloadError, GediValidationError
- try:
download_granule(granule, odir)
- except GediDownloadError as e:
logger.error(f”Download failed: {e}”)
Attributes#
Exceptions#
Base exception for all gedih3 errors. |
|
Base exception for network-related errors. |
|
Error during file download from NASA DAAC. |
|
Error during NASA Earthdata authentication. |
|
Error accessing GEDI data via S3. |
|
CMR returned fewer granules than its own CMR-Hits count (silent truncation). |
|
Base exception for validation errors. |
|
Error in H3 parameter validation. |
|
Error in EGI parameter validation. |
|
Error with GEDI product specification. |
|
Error with GEDI variable specification. |
|
Base exception for file-related errors. |
|
Error reading/processing HDF5 file. |
|
Error reading/writing Parquet file. |
|
File is corrupted or unreadable. |
|
Error during atomic file operation. |
|
Base exception for H3 database errors. |
|
H3 database directory not found. |
|
H3 database is corrupted or inconsistent. |
|
Error merging H3 partitions or databases. |
|
Error with spatial operations or filters. |
|
Error with temporal operations or filters. |
|
Base exception for data processing errors. |
|
Error during data aggregation. |
|
Error during rasterization. |
|
Error during raster image sampling at GEDI shot locations. |
|
Error during spatial join of vector data to GEDI shot locations. |
Functions#
|
Determine if an exception is retryable. |
Module Contents#
- exception gedih3.exceptions.GediError[source]#
Bases:
ExceptionBase exception for all gedih3 errors.
- exception gedih3.exceptions.GediNetworkError[source]#
Bases:
GediErrorBase exception for network-related errors.
- exception gedih3.exceptions.GediDownloadError(message: str, granule_id: str = None, attempts: int = None)[source]#
Bases:
GediNetworkErrorError during file download from NASA DAAC.
- granule_id = None#
- attempts = None#
- exception gedih3.exceptions.GediAuthenticationError[source]#
Bases:
GediNetworkErrorError during NASA Earthdata authentication.
- exception gedih3.exceptions.GediS3AccessError[source]#
Bases:
GediNetworkErrorError accessing GEDI data via S3.
- exception gedih3.exceptions.GediIncompleteListingError(message: str, expected: int = None, received: int = None)[source]#
Bases:
GediNetworkErrorCMR returned fewer granules than its own CMR-Hits count (silent truncation).
- expected = None#
- received = None#
- exception gedih3.exceptions.GediValidationError[source]#
Bases:
GediErrorBase exception for validation errors.
- exception gedih3.exceptions.H3ValidationError(message: str, param_name: str = None, value=None)[source]#
Bases:
GediValidationErrorError in H3 parameter validation.
- param_name = None#
- value = None#
- exception gedih3.exceptions.EGIValidationError(message: str, param_name: str = None, value=None)[source]#
Bases:
GediValidationErrorError in EGI parameter validation.
- param_name = None#
- value = None#
- exception gedih3.exceptions.GediProductError[source]#
Bases:
GediValidationErrorError with GEDI product specification.
- exception gedih3.exceptions.GediVariableError[source]#
Bases:
GediValidationErrorError with GEDI variable specification.
- exception gedih3.exceptions.GediFileError[source]#
Bases:
GediErrorBase exception for file-related errors.
- exception gedih3.exceptions.GediHDF5Error(message: str, file_path: str = None)[source]#
Bases:
GediFileErrorError reading/processing HDF5 file.
- file_path = None#
- exception gedih3.exceptions.GediParquetError(message: str, file_path: str = None)[source]#
Bases:
GediFileErrorError reading/writing Parquet file.
- file_path = None#
- exception gedih3.exceptions.GediCorruptedFileError(message: str, file_path: str = None)[source]#
Bases:
GediFileErrorFile is corrupted or unreadable.
- file_path = None#
- exception gedih3.exceptions.GediTransactionError(message: str, source_path: str = None, dest_path: str = None)[source]#
Bases:
GediFileErrorError during atomic file operation.
- source_path = None#
- dest_path = None#
- exception gedih3.exceptions.GediDatabaseError[source]#
Bases:
GediErrorBase exception for H3 database errors.
- exception gedih3.exceptions.GediDatabaseNotFoundError[source]#
Bases:
GediDatabaseErrorH3 database directory not found.
- exception gedih3.exceptions.GediDatabaseCorruptedError[source]#
Bases:
GediDatabaseErrorH3 database is corrupted or inconsistent.
- exception gedih3.exceptions.GediMergeError[source]#
Bases:
GediDatabaseErrorError merging H3 partitions or databases.
- exception gedih3.exceptions.GediSpatialError[source]#
Bases:
GediErrorError with spatial operations or filters.
- exception gedih3.exceptions.GediTemporalError[source]#
Bases:
GediErrorError with temporal operations or filters.
- exception gedih3.exceptions.GediProcessingError[source]#
Bases:
GediErrorBase exception for data processing errors.
- exception gedih3.exceptions.GediAggregationError[source]#
Bases:
GediProcessingErrorError during data aggregation.
- exception gedih3.exceptions.GediRasterizationError[source]#
Bases:
GediProcessingErrorError during rasterization.
- exception gedih3.exceptions.GediImageSamplingError[source]#
Bases:
GediProcessingErrorError during raster image sampling at GEDI shot locations.
- exception gedih3.exceptions.GediSpatialJoinError[source]#
Bases:
GediProcessingErrorError during spatial join of vector data to GEDI shot locations.
- gedih3.exceptions.RETRY_DEFAULTS#