diff --git a/geo/Calculation_gdal.py b/geo/Calculation_gdal.py index 1b88b7d..687616d 100644 --- a/geo/Calculation_gdal.py +++ b/geo/Calculation_gdal.py @@ -4,6 +4,8 @@ from osgeo import gdal # noqa except ImportError: import gdal # noqa +except ImportError: + raise ImportError("Package `gdal` is required to run this function. Install it with `pip install gdal`.") def raster_value(path: str) -> dict: diff --git a/requirements.txt b/requirements.txt index 120599a..b6877eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ pygments requests seaborn -gdal matplotlib -xmltodict \ No newline at end of file +xmltodic \ No newline at end of file