Urban Flood Mitigation Error - ValueError: invalid entry in choice array

Hello,

I keep having trouble when using the Urban Flood Mitigation module. I get ‘ValueError: invalid entry in choice array’

As far as I can tell from the log, it is something to do with not being able to create a cn raster, which I assume relates to the CN curve.

I have tested the biophysical parameter table that I produced with the sample data supplied with the InVEST model and that worked, so I don’t think the table can be wrong. I have also made sure that the projections are the same for all spatial data, and that the formats are the same as the sample data.

Could you help me figure out what else it may be please? The log is below:

2020-02-18 16:11:12,297 utils.prepare_workspace(115) INFO Writing log messages to C:/Users/Pevans/Dropbox/CEH/FM/Runs\InVEST-UrbanFloodRiskMitigation-log-2020-02-18–16_11_12.txt
2020-02-18 16:11:12,315 model._logged_target(1642) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.urban_flood_risk_mitigation 3.8.0:
aoi_watersheds_path C:/Users/Pevans/Dropbox/CEH/FM/Watersheds/waterss.shp
built_infrastructure_vector_path xx/Infrastructure/ND_buildingsType.shp
curve_number_table_path xx/UrbanFloodMitigation/Biophysical_water_SF.csv
infrastructure_damage_loss_table_path xx/flood_damage.csv
lulc_path xx/LC/ND3.tif
n_workers -1
rainfall_depth 900
results_suffix ND1_data1
soils_hydrological_group_raster_path xx/HOST/HOST3.tif
workspace_dir xx/Runs

2020-02-18 16:11:12,845 geoprocessing.raster_calculator(375) INFO starting stats_worker
2020-02-18 16:11:12,847 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-61, started daemon 332)>
2020-02-18 16:11:12,862 threading.run(870) DEBUG payload is None, terminating
2020-02-18 16:11:12,862 geoprocessing.raster_calculator(486) INFO Waiting for raster stats worker result.
2020-02-18 16:11:12,863 threading.run(870) WARNING No valid pixels were received, sending None.
2020-02-18 16:11:12,863 Task.add_task(641) ERROR Something went wrong when adding task create cn raster (1), terminating taskgraph.
Traceback (most recent call last):
File “site-packages\taskgraph\Task.py”, line 607, in add_task
File “site-packages\taskgraph\Task.py”, line 1071, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 829, in _lu_to_cn_op
File “<array_function internals>”, line 6, in choose
File “site-packages\numpy\core\fromnumeric.py”, line 433, in choose
File “site-packages\numpy\core\fromnumeric.py”, line 61, in _wrapfunc
ValueError: invalid entry in choice array
2020-02-18 16:11:12,868 model._logged_target(1648) ERROR Exception while executing <function execute at 0x0B1CA978>
Traceback (most recent call last):
File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 250, in execute
File “site-packages\taskgraph\Task.py”, line 607, in add_task
File “site-packages\taskgraph\Task.py”, line 1071, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 829, in _lu_to_cn_op
File “<array_function internals>”, line 6, in choose
File “site-packages\numpy\core\fromnumeric.py”, line 433, in choose
File “site-packages\numpy\core\fromnumeric.py”, line 61, in _wrapfunc
ValueError: invalid entry in choice array
2020-02-18 16:11:12,872 model._logged_target(1651) INFO Execution finished
2020-02-18 16:11:12,881 utils.prepare_workspace(121) INFO Elapsed time: 0.58s

Thanks in advance

Hi there, thanks for posting.

I was able to reproduce this error when I used a Soils Hydrological Group Raster that included values outside the acceptable values of 1, 2, 3, 4. Could you check your raster and see if there are pixel values other than those?

I see that this data requirement is not well-documented in the User’s Guide, so I’ll be sure to fix that. We can also provide a more descriptive error message for this case in the future.

Hi Dave,

Thanks for the quick reply and help.

The first problem has been fixed; it was to do with the Hydrological Group Raster – I had NoData values as part of the raster, which
looks like it caused the error.

However, I now have another error, the log of which is below. This time it just says KeyError 2.0., so I am having difficulty understanding
what that specifically relates to.

Any help would be appreciated.

Thank you

2020-02-19 11:48:32,752 geoprocessing.align_and_resize_raster_stack(752) INFO 1 of 2 aligned: aligned_lulc_ND1_host3.tif

2020-02-19 11:48:34,696 geoprocessing.align_and_resize_raster_stack(752) INFO 2 of 2 aligned: aligned_soils_hydrological_group_ND1_host3.tif

2020-02-19 11:48:34,697 geoprocessing.align_and_resize_raster_stack(754) INFO aligned all 2 rasters.

2020-02-19 11:48:35,473 geoprocessing.raster_calculator(375) INFO starting stats_worker

2020-02-19 11:48:35,486 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-12, started daemon 5764)>

2020-02-19 11:48:36,277 geoprocessing.raster_calculator(454) INFO 100.0%% complete

2020-02-19 11:48:36,277 geoprocessing.raster_calculator(457) INFO signaling stats worker to terminate

2020-02-19 11:48:36,278 threading.run(870) DEBUG payload is None, terminating

2020-02-19 11:48:36,277 geoprocessing.raster_calculator(459) INFO Waiting for raster stats worker result.

2020-02-19 11:48:37,018 geoprocessing.raster_calculator(375) INFO starting stats_worker

2020-02-19 11:48:37,025 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-13, started daemon 24416)>

2020-02-19 11:48:37,270 geoprocessing.raster_calculator(454) INFO 100.0%% complete

2020-02-19 11:48:37,271 geoprocessing.raster_calculator(457) INFO signaling stats worker to terminate

2020-02-19 11:48:37,271 threading.run(870) DEBUG payload is None, terminating

2020-02-19 11:48:37,271 geoprocessing.raster_calculator(459) INFO Waiting for raster stats worker result.

2020-02-19 11:48:37,843 geoprocessing.raster_calculator(375) INFO starting stats_worker

2020-02-19 11:48:37,846 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-14, started daemon 16644)>

2020-02-19 11:48:38,139 geoprocessing.raster_calculator(454) INFO 100.0%% complete

2020-02-19 11:48:38,140 geoprocessing.raster_calculator(457) INFO signaling stats worker to terminate

2020-02-19 11:48:38,140 threading.run(870) DEBUG payload is None, terminating

2020-02-19 11:48:38,140 geoprocessing.raster_calculator(459) INFO Waiting for raster stats worker result.

2020-02-19 11:48:38,749 geoprocessing.raster_calculator(375) INFO starting stats_worker

2020-02-19 11:48:38,752 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-15, started daemon 21024)>

2020-02-19 11:48:38,999 geoprocessing.raster_calculator(454) INFO 100.0%% complete

2020-02-19 11:48:39,000 geoprocessing.raster_calculator(457) INFO signaling stats worker to terminate

2020-02-19 11:48:39,001 threading.run(870) DEBUG payload is None, terminating

2020-02-19 11:48:39,000 geoprocessing.raster_calculator(459) INFO Waiting for raster stats worker result.

2020-02-19 11:48:39,636 geoprocessing.raster_calculator(375) INFO starting stats_worker

2020-02-19 11:48:39,639 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-16, started daemon 8528)>

2020-02-19 11:48:39,837 geoprocessing.raster_calculator(454) INFO 100.0%% complete

2020-02-19 11:48:39,837 geoprocessing.raster_calculator(457) INFO signaling stats worker to terminate

2020-02-19 11:48:39,838 threading.run(870) DEBUG payload is None, terminating

2020-02-19 11:48:39,838 geoprocessing.raster_calculator(459) INFO Waiting for raster stats worker result.

2020-02-19 11:48:40,485 geoprocessing.raster_calculator(375) INFO starting stats_worker

2020-02-19 11:48:40,489 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-17, started daemon 18060)>

2020-02-19 11:48:40,684 geoprocessing.raster_calculator(454) INFO 100.0%% complete

2020-02-19 11:48:40,685 geoprocessing.raster_calculator(457) INFO signaling stats worker to terminate

2020-02-19 11:48:40,686 threading.run(870) DEBUG payload is None, terminating

2020-02-19 11:48:40,685 geoprocessing.raster_calculator(459) INFO Waiting for raster stats worker result.

2020-02-19 11:48:41,310 urban_flood_risk_mitigation._build_affected_vector(619) WARNING C:/Users/Pevans/Dropbox/CEH/FM/Runs\temp_working_dir_not_for_humans\intermediate_flood_risk_service_ND1_host3.gpkg
exists, removing to make a current one

2020-02-19 11:48:41,524 geoprocessing.reproject_vector(1640) INFO starting reprojection

2020-02-19 11:48:42,249 geoprocessing.reproject_vector(1683) INFO reprojection 100.0% complete on intermediate_flood_risk_service_ND1_host3.gpkg

2020-02-19 11:48:42,414 urban_flood_risk_mitigation._build_affected_vector(650) INFO building infrastructure lookup dict

2020-02-19 11:48:42,416 Task.add_task(641) ERROR Something went wrong when adding task build affected vector (7), terminating taskgraph.

Traceback (most recent call last):

File “site-packages\taskgraph\Task.py”, line 607, in add_task

File “site-packages\taskgraph\Task.py”, line 1071, in _call

File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 661, in _build_affected_vector

KeyError: 2.0

2020-02-19 11:48:42,419 model._logged_target(1648) ERROR Exception while executing <function execute at 0x0BACA978>

Traceback (most recent call last):

File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target

File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 347, in execute

File “site-packages\taskgraph\Task.py”, line 607, in add_task

File “site-packages\taskgraph\Task.py”, line 1071, in _call

File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 661, in _build_affected_vector

KeyError: 2.0

2020-02-19 11:48:42,422 model._logged_target(1651) INFO Execution finished

2020-02-19 11:48:42,429 utils.prepare_workspace(121) INFO Elapsed time: 11.3s

The second error was produced because I forgot to change the ‘Potential damage loss for each building type’ csv when I simplified it to try and work out the cause of the first error!

Thanks for you answer again.

Glad to hear it!

Yep, KeyErrors in InVEST tend to indicate missing row/column headers in CSV inputs. Glad you figured that out!

Hi, I just started trying to run the Urban Flood Mitigation model today. I have my curve number table, HSG raster, and land use raster (no infrastructure data). I got the following errors partway through:
020-04-07 16:38:36,094 Task.add_task(641) ERROR Something went wrong when adding task create cn raster (1), terminating taskgraph.
Traceback (most recent call last):
File “site-packages\taskgraph\Task.py”, line 607, in add_task
File “site-packages\taskgraph\Task.py”, line 1071, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 816, 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-04-07 16:38:36,094 model._logged_target(1648) ERROR Exception while executing <function execute at 0x0DF3A9C0>
Traceback (most recent call last):
File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 250, in execute
File “site-packages\taskgraph\Task.py”, line 607, in add_task
File “site-packages\taskgraph\Task.py”, line 1071, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 816, 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-04-07 16:38:36,094 model._logged_target(1651) INFO Execution finished
2020-04-07 16:38:36,094 utils.prepare_workspace(121) INFO Elapsed time: 7m 51.420000000000016s

I didn’t copy all the lines, perhaps I should have just copied the whole log:

2020-04-07 16:30:44,673 utils.prepare_workspace(115) INFO Writing log messages to C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\InVEST-UrbanFloodRiskMitigation-log-2020-04-07–16_30_44.txt
2020-04-07 16:30:44,674 model._logged_target(1642) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.urban_flood_risk_mitigation 3.8.0:
aoi_watersheds_path C:/ESRI/GISDATA/Dakotas/BigSioux/hydrography/huc04_bs.shp
built_infrastructure_vector_path
curve_number_table_path C:/InVEST_3.7.0_x86/seasonal_water_yield/curvenumber.csv
infrastructure_damage_loss_table_path
lulc_path C:/ESRI/GISDATA/Dakotas/BigSioux/LULC/nlcd2016utm.tif
n_workers -1
rainfall_depth 25
results_suffix 1
soils_hydrological_group_raster_path C:/ESRI/GISDATA/Dakotas/BigSioux/Soils/HSG_utm.tif
workspace_dir C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace

2020-04-07 16:30:54,142 geoprocessing.logger_callback(3239) INFO Warp 2.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:31:03,642 geoprocessing.logger_callback(3239) INFO Warp 4.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:31:14,284 geoprocessing.logger_callback(3239) INFO Warp 6.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:31:20,068 geoprocessing.logger_callback(3239) INFO Warp 7.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:31:25,875 geoprocessing.logger_callback(3239) INFO Warp 8.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:31:36,357 geoprocessing.logger_callback(3239) INFO Warp 10.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:31:45,500 geoprocessing.logger_callback(3239) INFO Warp 12.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:31:54,600 geoprocessing.logger_callback(3239) INFO Warp 14.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:32:04,021 geoprocessing.logger_callback(3239) INFO Warp 16.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:32:13,380 geoprocessing.logger_callback(3239) INFO Warp 18.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:32:22,724 geoprocessing.logger_callback(3239) INFO Warp 20.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:32:31,948 geoprocessing.logger_callback(3239) INFO Warp 22.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:32:41,398 geoprocessing.logger_callback(3239) INFO Warp 24.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:32:50,750 geoprocessing.logger_callback(3239) INFO Warp 26.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:33:00,039 geoprocessing.logger_callback(3239) INFO Warp 28.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:33:09,158 geoprocessing.logger_callback(3239) INFO Warp 30.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:33:18,278 geoprocessing.logger_callback(3239) INFO Warp 32.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:33:27,530 geoprocessing.logger_callback(3239) INFO Warp 34.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:33:36,712 geoprocessing.logger_callback(3239) INFO Warp 36.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:33:45,988 geoprocessing.logger_callback(3239) INFO Warp 38.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:33:55,240 geoprocessing.logger_callback(3239) INFO Warp 40.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:34:00,518 geoprocessing.logger_callback(3239) INFO Warp 41.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:34:10,108 geoprocessing.logger_callback(3239) INFO Warp 43.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:34:19,111 geoprocessing.logger_callback(3239) INFO Warp 45.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:34:28,440 geoprocessing.logger_callback(3239) INFO Warp 47.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:34:37,364 geoprocessing.logger_callback(3239) INFO Warp 49.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:34:46,787 geoprocessing.logger_callback(3239) INFO Warp 51.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:34:56,039 geoprocessing.logger_callback(3239) INFO Warp 53.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:35:05,209 geoprocessing.logger_callback(3239) INFO Warp 55.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:35:14,230 geoprocessing.logger_callback(3239) INFO Warp 57.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:35:23,418 geoprocessing.logger_callback(3239) INFO Warp 59.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:35:32,769 geoprocessing.logger_callback(3239) INFO Warp 61.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:35:41,922 geoprocessing.logger_callback(3239) INFO Warp 63.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:35:50,929 geoprocessing.logger_callback(3239) INFO Warp 65.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:36:00,043 geoprocessing.logger_callback(3239) INFO Warp 67.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:36:09,090 geoprocessing.logger_callback(3239) INFO Warp 69.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:36:18,206 geoprocessing.logger_callback(3239) INFO Warp 71.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:36:27,266 geoprocessing.logger_callback(3239) INFO Warp 73.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:36:36,527 geoprocessing.logger_callback(3239) INFO Warp 75.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:36:45,609 geoprocessing.logger_callback(3239) INFO Warp 77.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:36:54,646 geoprocessing.logger_callback(3239) INFO Warp 79.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:37:03,715 geoprocessing.logger_callback(3239) INFO Warp 81.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:37:13,306 geoprocessing.logger_callback(3239) INFO Warp 83.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:37:22,941 geoprocessing.logger_callback(3239) INFO Warp 85.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:37:32,530 geoprocessing.logger_callback(3239) INFO Warp 87.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:37:41,312 geoprocessing.logger_callback(3239) INFO Warp 89.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:37:49,675 geoprocessing.logger_callback(3239) INFO Warp 91.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:37:58,039 geoprocessing.logger_callback(3239) INFO Warp 93.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:38:06,442 geoprocessing.logger_callback(3239) INFO Warp 95.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:38:14,792 geoprocessing.logger_callback(3239) INFO Warp 97.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:38:23,249 geoprocessing.logger_callback(3239) INFO Warp 99.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:38:27,427 geoprocessing.logger_callback(3239) INFO Warp 100.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_lulc_1.tif
2020-04-07 16:38:27,793 geoprocessing.align_and_resize_raster_stack(752) INFO 1 of 2 aligned: aligned_lulc_1.tif
2020-04-07 16:38:32,885 geoprocessing.logger_callback(3239) INFO Warp 63.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_soils_hydrological_group_1.tif
2020-04-07 16:38:35,540 geoprocessing.logger_callback(3239) INFO Warp 100.0% complete C:\Users\KBLANN\Documents\urban_flood_risk_mitigation_workspace\temp_working_dir_not_for_humans\aligned_soils_hydrological_group_1.tif
2020-04-07 16:38:36,012 geoprocessing.align_and_resize_raster_stack(752) INFO 2 of 2 aligned: aligned_soils_hydrological_group_1.tif
2020-04-07 16:38:36,012 geoprocessing.align_and_resize_raster_stack(754) INFO aligned all 2 rasters.
2020-04-07 16:38:36,078 geoprocessing.raster_calculator(375) INFO starting stats_worker
2020-04-07 16:38:36,078 geoprocessing.raster_calculator(381) INFO started stats_worker <Thread(Thread-2, started daemon 3040)>
2020-04-07 16:38:36,094 threading.run(870) DEBUG payload is None, terminating
2020-04-07 16:38:36,094 geoprocessing.raster_calculator(486) INFO Waiting for raster stats worker result.
2020-04-07 16:38:36,094 threading.run(870) WARNING No valid pixels were received, sending None.
2020-04-07 16:38:36,094 Task.add_task(641) ERROR Something went wrong when adding task create cn raster (1), terminating taskgraph.
Traceback (most recent call last):
File “site-packages\taskgraph\Task.py”, line 607, in add_task
File “site-packages\taskgraph\Task.py”, line 1071, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 816, 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-04-07 16:38:36,094 model._logged_target(1648) ERROR Exception while executing <function execute at 0x0DF3A9C0>
Traceback (most recent call last):
File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 250, in execute
File “site-packages\taskgraph\Task.py”, line 607, in add_task
File “site-packages\taskgraph\Task.py”, line 1071, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 424, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 816, 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-04-07 16:38:36,094 model._logged_target(1651) INFO Execution finished
2020-04-07 16:38:36,094 utils.prepare_workspace(121) INFO Elapsed time: 7m 51.420000000000016s

Hi @kblann, I think this is the same error as posted over in Urban Flood Mitigation model run error, right? If so, let’s continue the conversation over there!

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