Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/compass/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import compass

gdal.UseExceptions()

WORKFLOW_SCRIPTS_DIR = os.path.dirname(compass.__file__)
OPERA_OPERATION_CONTACT_EMAIL = 'opera-sds-ops@jpl.nasa.gov'
Expand Down Expand Up @@ -351,7 +352,7 @@ def open_raster(filename, band=1):
ds = gdal.Open(filename, gdal.GA_ReadOnly)
arr = ds.GetRasterBand(band).ReadAsArray()
return arr
except AttributeError:
except RuntimeError:
# GDAL reads 1st 2 bytes of ENVI binary to determine file type. If 1st
# bytes of flat binary is that of a jpeg but the binary is not then
# GDAL throws a libjpeg runtime error. Follow specifically tries to
Expand Down