Urban Flood Risk Mitigation error

Can you help me troubleshoot this error ?
Initializing…
Showing messages with level INFO and higher
2020-12-03 23:40:46,177 utils.prepare_workspace(111) INFO Writing log messages to C:/Users/Hildgard/Desktop/Hoping_for_eggharbor\InVEST-UrbanFloodRiskMitigation-log-2020-12-03–23_40_46.txt
2020-12-03 23:40:46,178 model._logged_target(1626) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.urban_flood_risk_mitigation 3.8.9:
aoi_watersheds_path C:/Users/Hildgard/Desktop/Invest Input/EggHarborWS.shp
built_infrastructure_vector_path
curve_number_table_path C:/Users/Hildgard/Desktop/Invest Input/CNtableNJ3.csv
infrastructure_damage_loss_table_path
lulc_path C:/Users/Hildgard/Desktop/Invest Input/EggHarborLandCOver.tif
n_workers -1
rainfall_depth 2
results_suffix t1-2
soils_hydrological_group_raster_path C:/Users/Hildgard/Desktop/Invest Input/EHWSsoil.tif
workspace_dir C:/Users/Hildgard/Desktop/Hoping_for_eggharbor

2020-12-03 23:40:46,207 validation._wrapped_validate_func(916) INFO Starting whole-model validation with ARGS_SPEC
2020-12-03 23:40:46,207 validation.timeout(626) INFO Starting file checking thread with timeout=5
2020-12-03 23:40:46,216 validation.timeout(638) INFO File checking thread completed.
2020-12-03 23:40:46,216 validation.timeout(626) INFO Starting file checking thread with timeout=5
2020-12-03 23:40:46,218 validation.timeout(638) INFO File checking thread completed.
2020-12-03 23:40:46,218 validation.timeout(626) INFO Starting file checking thread with timeout=5
2020-12-03 23:40:46,219 validation.timeout(638) INFO File checking thread completed.
2020-12-03 23:40:46,219 validation.timeout(626) INFO Starting file checking thread with timeout=5
2020-12-03 23:40:46,235 validation.timeout(638) INFO File checking thread completed.
2020-12-03 23:40:46,235 validation.timeout(626) INFO Starting file checking thread with timeout=5
2020-12-03 23:40:46,237 validation.timeout(638) INFO File checking thread completed.
2020-12-03 23:40:51,595 geoprocessing.logger_callback(3239) INFO Warp 17.0% complete C:/Users/Hildgard/Desktop/Hoping_for_eggharbor\temp_working_dir_not_for_humans\aligned_lulc_t1-2.tif
2020-12-03 23:40:56,845 geoprocessing.logger_callback(3239) INFO Warp 34.0% complete C:/Users/Hildgard/Desktop/Hoping_for_eggharbor\temp_working_dir_not_for_humans\aligned_lulc_t1-2.tif
2020-12-03 23:41:02,058 geoprocessing.logger_callback(3239) INFO Warp 51.0% complete C:/Users/Hildgard/Desktop/Hoping_for_eggharbor\temp_working_dir_not_for_humans\aligned_lulc_t1-2.tif
2020-12-03 23:41:07,373 geoprocessing.logger_callback(3239) INFO Warp 68.0% complete C:/Users/Hildgard/Desktop/Hoping_for_eggharbor\temp_working_dir_not_for_humans\aligned_lulc_t1-2.tif
2020-12-03 23:41:12,585 geoprocessing.logger_callback(3239) INFO Warp 85.0% complete C:/Users/Hildgard/Desktop/Hoping_for_eggharbor\temp_working_dir_not_for_humans\aligned_lulc_t1-2.tif
2020-12-03 23:41:17,124 geoprocessing.logger_callback(3239) INFO Warp 100.0% complete C:/Users/Hildgard/Desktop/Hoping_for_eggharbor\temp_working_dir_not_for_humans\aligned_lulc_t1-2.tif
2020-12-03 23:41:17,165 geoprocessing.align_and_resize_raster_stack(752) INFO 1 of 2 aligned: aligned_lulc_t1-2.tif
2020-12-03 23:41:17,737 geoprocessing.align_and_resize_raster_stack(752) INFO 2 of 2 aligned: aligned_soils_hydrological_group_t1-2.tif
2020-12-03 23:41:17,737 geoprocessing.align_and_resize_raster_stack(754) INFO aligned all 2 rasters.
2020-12-03 23:41:17,753 utils.build_lookup_from_csv(521) WARNING Empty or NaN values were found in the table: C:/Users/Hildgard/Desktop/Invest Input/CNtableNJ3.csv.
2020-12-03 23:41:17,763 geoprocessing.raster_calculator(375) INFO starting stats_worker
2020-12-03 23:41:17,765 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-117, started daemon 11488)>
2020-12-03 23:41:17,798 geoprocessing.raster_calculator(486) INFO Waiting for raster stats worker result.
2020-12-03 23:41:17,799 threading.run(870) WARNING No valid pixels were received, sending None.
2020-12-03 23:41:17,799 Task.add_task(731) ERROR Something went wrong when adding task create Curve Number raster (1), terminating taskgraph.
Traceback (most recent call last):
File “site-packages\taskgraph\Task.py”, line 697, in add_task
File “site-packages\taskgraph\Task.py”, line 1174, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 771, in _lu_to_cn_op
File “site-packages\scipy\sparse_index.py”, line 35, in getitem
File “site-packages\scipy\sparse_index.py”, line 139, in _validate_indices
File “site-packages\scipy\sparse_index.py”, line 171, in _asindices
IndexError: index (128) out of range
2020-12-03 23:41:17,800 model._logged_target(1632) ERROR Exception while executing <function execute at 0x1CEA43D8>
Traceback (most recent call last):
File “site-packages\natcap\invest\ui\model.py”, line 1629, in _logged_target
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 241, in execute
File “site-packages\taskgraph\Task.py”, line 697, in add_task
File “site-packages\taskgraph\Task.py”, line 1174, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 771, in _lu_to_cn_op
File “site-packages\scipy\sparse_index.py”, line 35, in getitem
File “site-packages\scipy\sparse_index.py”, line 139, in _validate_indices
File “site-packages\scipy\sparse_index.py”, line 171, in _asindices
IndexError: index (128) out of range
2020-12-03 23:41:17,801 model._logged_target(1635) INFO Execution finished
2020-12-03 23:41:17,802 utils.prepare_workspace(117) INFO Elapsed time: 31.63s
2020-12-03 23:41:17,803 execution.run(78) ERROR Target <function InVESTModel.execute_model.._logged_target at 0x1E4B1AE0> failed with exception
Traceback (most recent call last):
File “site-packages\natcap\invest\ui\execution.py”, line 68, in run
File “site-packages\natcap\invest\ui\model.py”, line 1629, in _logged_target
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 241, in execute
File “site-packages\taskgraph\Task.py”, line 697, in add_task
File “site-packages\taskgraph\Task.py”, line 1174, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 771, in _lu_to_cn_op
File “site-packages\scipy\sparse_index.py”, line 35, in getitem
File “site-packages\scipy\sparse_index.py”, line 139, in _validate_indices
File “site-packages\scipy\sparse_index.py”, line 171, in _asindices
IndexError: index (128) out of range
2020-12-03 23:41:17,805 execution.run(83) INFO Execution finished
Index Error encountered: Index (128) out of range

Hi @LINK,
Please see this thread which describes a solution to the same error. If that doesn’t help let me know!

1 Like