This forum is shutting down! Please post new discussions at

Error (not environment related) in "Sediment Retention" and "Nutrient Delivery" model

mariarojasmariarojas Member
edited February 2017 in Terrestrial Models
Hi everyone, I would like please to ask for your help. I am new with the software and for my thesis I am running three ecosystem services in the same area, all with invest version 2.5.6, as this is part of the GLOBAQUA project and they calibrated and used this version. 

With Water Yield says "runs successfully". But with both Sediment and Nutrient retention model, even showing all the entry data is ok, it keeps showing after running this error: (I copy here and attach respectively the text file for each model)

02/04/2017 23:25:10  root               ERROR    Error: a problem occurred while running the model
02/04/2017 23:25:10  root               DEBUG    Exception not environment-related
02/04/2017 23:25:10  root               DEBUG    Printing traceback
Traceback (most recent call last):
  File "invest_natcap\iui\executor.pyc", line 455, in runModel
  File "invest_natcap\sediment\sediment.pyc", line 234, in execute
  File "invest_natcap\raster_utils.pyc", line 1055, in aggregate_raster_values_uri
KeyError: 0
02/04/2017 23:32:06  root               ERROR    Error: a problem occurred while running the model
02/04/2017 23:32:06  root               DEBUG    Exception not environment-related
02/04/2017 23:32:06  root               DEBUG    Printing traceback
Traceback (most recent call last):
  File "invest_natcap\iui\executor.pyc", line 455, in runModel
  File "invest_natcap\nutrient\nutrient.pyc", line 36, in execute
  File "invest_natcap\hydropower\hydropower_water_yield.pyc", line 367, in execute
  File "invest_natcap\raster_utils.pyc", line 1040, in aggregate_raster_values_uri
KeyError: 0

With this error, in the output from Sediment model there is just .tif files and no shapes or tables. 
In the Nutrient model, the output shows a folder named water_yield_workspace but no other results related with nutrients.

Thanks a lot for your time, I really appreciate some help with this. Best regards, María
Post edited by mariarojas on


  • I could solve it just today, thanks!
  • RichRich Administrator, NatCap Staff
    Hi, just a note, I see you're using InVEST 2.5.6; that's nearly 4 years old at this point.  We've revised many core science issues related to both sediment and nutrient models since then. Aside from a host of software bugs and general performance improvements.  Anyway, we strongly recommend you use a newer version of InVEST if you can:
  • Hi Rich, thanks for the advice.

    I would like to ask you, if I use the last version of invest, I would have to calibrate the model before running my data, right?

    I am using 2.5.6 invest because it is already calibrated for the data I am using. As somehow there is a limitation in time now for my work, it is not clear for me if I can use a new version and run the model without doing a calibration process.

    I appreciate your advice, best regards Maria
  • RichRich Administrator, NatCap Staff
    Hi and sorry Maria, I understand the stress of being under a deadline.  Yes, you'd need to recalibrate if you were to use our new sediment model since it's got a different biophysical driver (sediment delivery ratio for 3.x vs. exponential sediment decay for 2.5.6).

Sign In or Register to comment.