SDR running error

Hi! This is the whole log file (.txt) that the model produces in my Workspace. how can i solve it. thanks
InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2021-08-10–10_10_36.txt (1.8 KB)

Hi @dhamma57 ,

Thank for posting and including the logfile. It looks like your biophysical table might have two entries with lucode column of 5. This column is used as an index and should contain unique values.

I’m going to post the entire error message below because the actual useful error information gets a little buried at the end. But the useful bit is:

ERROR The ‘key_field’ : ‘lucode’ column values are not unique: [1, 2, 3, 4, 5, 6, 7, 8, 5]


2021-08-10 10:10:36,121 utils.build_lookup_from_csv(544) ERROR The 'key_field' : 'lucode' column values are not unique: [1, 2, 3, 4, 5, 6, 7, 8, 5]
2021-08-10 10:10:36,122 model._logged_target(1652) ERROR Exception while executing <function execute at 0x000001EA045790D8>
Traceback (most recent call last):
  File "site-packages\natcap\invest\ui\model.py", line 1649, in _logged_target
  File "site-packages\natcap\invest\sdr\sdr.py", line 271, in execute
  File "site-packages\natcap\invest\utils.py", line 541, in build_lookup_from_csv
  File "site-packages\pandas\core\frame.py", line 1543, in to_dict
ValueError: DataFrame index must be unique for orient='index'.
2021-08-10 10:10:36,123 model._logged_target(1655) INFO Execution finished
2021-08-10 10:10:36,127 utils.prepare_workspace(129) INFO Elapsed time: 0.03s

Let us know if that solves the issue.

Doug

2 Likes

Oh, yes !, Thank you very much

1 Like

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