Seasonal Water Yield Error - 3.8.7. "ufunc 'isfinite' is not supported for the input types.."

I have tried to run the seasonal water yield model with a previous version (3.8.4) and the latest version (3.8.7) and I keep getting this error: "ufunc ‘isfinite’ is not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule “safe”. Any suggestion? I attach the log.
Many many thanks!

LuisaInVEST-Seasonal-Water-Yield-log-2020-07-25–12_48_22.txt (10.4 KB)

Hi @luisagalgani,

Could you make sure your input rasters have a defined nodata value? We’ve seen this error before when a raster had an undefined nodata value. See this forum post: TypeError: ufunc ‘isfinite’ in HQ model.

In the future we will handle undefined nodata values correctly. If this error still occurs let us know!


Hi @dcdenu4
thanks for your tips! I corrected all input rasters and now I do not get this error anymore InVEST-Seasonal-Water-Yield-log-2020-07-27–15_13_55.txt (8.8 KB) but I get another error instead - key error 12. I attach the log. Any idea of what it may be?

Hi Luisa -

Thanks for posting the log file. There are many other forum posts regarding KeyErrors, including this one specifically about Seasonal Water Yield and curve number. Check it out and let us know if it helps.

~ Stacie

1 Like

Thank you @swolny and @dcdenu4 , problem solved! It was a problem in the soil layer, where I had two classes coresponding to B/D and C/D that were not the same in the LULC biophysical table. Now the model runs.
Thanks again and have a great day


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.