You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try:
fromosgeoimportgdal, osrexceptImportError:
raiseImportError("GDAL is not installed. Install it with pip install GDAL")
# [SNIP]gdal.UseExceptions()
One of the importss is wrapped in a try, but the others are not. I suggest dropping the try/except wrapping.
The UseExceptions is great as that will become the default behavior of GDAL in the future. I suggest always doing that right after the imports each time there is a from osgeo import
Here
geemap/geemap/common.py
Line 10794 in 9c990ba
Whereas here
geemap/geemap/common.py
Line 15128 in 9c990ba
UseExceptions
is great as that will become the default behavior of GDAL in the future. I suggest always doing that right after the imports each time there is afrom osgeo import
gdal.PushErrorHandler
calls are missing the matchinggdal.PopErrorHandler()
. You are welcome to use this context manager if it makes things easier. https://github.com/schwehr/gdal-autotest2/blob/577974592837fdfc18fd90b338cb657f1f2332bd/python/gcore/gcore_util.py#L50The text was updated successfully, but these errors were encountered: