SWY: KeyError:0 curve number (15)

464 / 5.000

I am starting with the model and I get the error KeyError:0 Something went wrong when adding task calculate curve number (15) I have searched for a similar problem in the forum and following the checks that the NoData values of all the rasters are 0 and that the soil hydrology values are 1,2,3,4; but i keep getting the same error. I am using ArcGis Pro to process the data. I don’t understand in which layer the problem can be.

Attach the logfile here: InVEST-natcap.invest.seasonal_water_yield.seasonal_water_yield-log-2023-03-18–16_41_02.txt (11.3 KB)

Hi @SofiaEscotoH , thanks for posting here. It does sound like this issue is very similar to the one described here, and possibly related to the NoData value not being defined in the raster: Seasonal Water Yield: Key Error

Since you have already checked for that, feel free to upload your soil raster here and we can take a closer look.

Thank you,

1 Like

Thanks for your reply, here you are the soil layer

hidroSoil.zip (213.7 KB)

@SofiaEscotoH , thanks for sharing your dataset. It looks like the NoData value of the raster is set to 15. That’s fine, but there are other pixels with a value of 0, which is the reason for the KeyError: 0

This raster must have only values of 1, 2, 3, or 4. If you intend the 0s to be NoData, you could reclassify them to 15 (your NoData value). Or if they are not meant to be NoData, they will need to be reclassed to 1, 2, 3, or 4.

Hope that helps,

1 Like

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