-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDAL mistakes one of the ENVI correction rasters for a JPEG and fails #206
Comments
hmmm yes it looks like it's still happening on main:
|
Maybe there were different gdal versions being tested? I was also getting a Did we purposely leave out a |
just clarifying: There's a chance that the docker SAS will run correctly as is. But I think if anything running the sas has called >>> from osgeo import gdal
# the `Open()` returned None, so it's an attribute error
>>> gdal.Open('asdf').GetRasterBand(1)
ERROR 4: asdf: No such file or directory
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'GetRasterBand'
# a real exception is raised here
>>> gdal.UseExceptions()
>>> gdal.Open('asdf').GetRasterBand(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/u/aurora-r0/staniewi/miniconda3/envs/mapping-311/lib/python3.11/site-packages/osgeo/gdal.py", line 5297, in Open
return _gdal.Open(*args)
^^^^^^^^^^^^^^^^^
RuntimeError: asdf: No such file or directory |
Right now an attribute error gets thrown only if no code has called `UseExceptions`. closes opera-adt#206
Would you mind sharing the runconfig above, I'll try to reproduce the error on my end sometime next week. Regarding |
@taliboliver found a very sneaky bug:
Reproduce with:
Apparently the
x.rdr
raster inside thecorrections
folder is getting misread by GDAL. I've seen a similar problem with other binary drivers here OSGeo/gdal#4713 , but I think GDAL uses a heuristic to guess the driver, and if the contents of the file match the heuristic, it can guess wrong.The text was updated successfully, but these errors were encountered: