Habitat Quality TypeError: ufunc 'isfinite'

Hi everyone,

I am trying to run the ‘Habitat Quality’ model and an error occured. I am using InVEST 3.8.5 x86 on Win10. I have projected all the rasters into linear units and resampled them to the same resolution (maybe not neccesary), but I still got the error as presented in the log file. InVEST-Habitat-Quality-log-2020-07-18–15_49_46.txt (3.4 KB)

Since I am using two rasters of “GDP” and “population”, with values ranging from 0-1 instead of binary rasters, I wonder if the error has something to do with it? I have successfully ran the model using all binary rasters with only 1s and 0s. I am not sure whether this model works for threat rasters with continous values. All the relevant files are uploaded for your information. Thanks.

Hi @mag813,

Thanks for posting. Could you check and make sure that your threat rasters and LULC rasters have a defined nodata value? We’ve seen this error before when a threat 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!