-
Notifications
You must be signed in to change notification settings - Fork 20
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
Allow errors besides RasterioIOError in odc.stac.load with fail_on_error=False #122
Comments
Hm, I think that code should just catch a more generic I'm not sure about the value of capturing user configured exception types, this might be reasonable if we had support for multiple IO backends, but we only have |
Ok, makes sense I'm testing it out, |
thanks @jessjaco, happy to accept a PR if that works for you. And for a more generic handling of errors I'd rather go with a user supplied callback, although Dask adds some constraints on that approach. |
I'm getting an error while reading a tiff that starts with
rasterio._err.CPLE_AppDefinedError: IReadBlock failed at X offset 9, Y offset 3: TIFFReadEncodedTile() failed
etc. and ends withrasterio.errors.WarpOperationError: Chunk and warp failed
. I can send a more detailed example but ultimately this is a bad data file, and I just want to ignore the error and go on to the next file.I see here
odc-stac/odc/stac/_reader.py
Line 187 in 52a016b
that this specific error is not ignored. Would it be possible to set the specific errors that could be ignored, or something similar? As an example,
stackstac.stack
has an errors_as_nodata option, which allows specific errors to be defined.The text was updated successfully, but these errors were encountered: