Open dcdenu4 opened 11 months ago
Similar issue popping up in NDR with the same user: https://community.naturalcapitalproject.org/t/ndr-output-version-3-10-2-vs-3-14-0/4351/2
According to their logs, this does not happen when running 3.10.2 with the same data.
2023-11-30 20:07:06,685 (pygeoprocessing.geoprocessing) geoprocessing.align_and_resize_raster_stack(1000) INFO aligned all 3 rasters.
2023-11-30 20:07:06,973 (osgeo) utils._log_gdal_errors(97) WARNING [errno 1] Too few points in geometry component at or near point 931.63784461152864 -814.10501253132861
2023-11-30 20:07:06,974 (osgeo) utils._log_gdal_errors(97) ERROR [errno 1] Cutline polygon is invalid.
2023-11-30 20:07:07,224 (osgeo) utils._log_gdal_errors(97) WARNING [errno 1] Too few points in geometry component at or near point 931.63784461152864 -814.10501253132861
2023-11-30 20:07:07,224 (osgeo) utils._log_gdal_errors(97) ERROR [errno 1] Cutline polygon is invalid.
2023-11-30 20:07:07,419 (osgeo) utils._log_gdal_errors(97) WARNING [errno 1] Too few points in geometry component at or near point 931.63784461152864 -814.10501253132861
2023-11-30 20:07:07,419 (osgeo) utils._log_gdal_errors(97) ERROR [errno 1] Cutline polygon is invalid.
I think this situation would be handled better if we enable gdal.UseExceptions()
. Then the GDAL error would be raised as a python error and stop execution where the issue happens. Rather than just logging the error message and continuing until another problem results from it downstream.
Related, pygeoprocessing will in the future use gdal.UseExceptions()
and our plan is to have InVEST as well.
So, this error handling could shake as resolved from including gdal.UseExceptions()
in the near future.
On hold in favor of doing https://github.com/natcap/invest/issues/1570
A user posted about experiencing an error with HQ in 3.14.0. The logfiles revelead:
I'm not sure I've ever seen this before, but it looks like the aligned step succeeded when in fact, I don't think that aligned output ever gets created. It would be great to better handle an error message like this.