What is the issue or question you have?
How can I correct the index error message? I originally received an index error saying 15 is out of bounds. It looks like the object Id column was creating the problem in the land use raster I am using. However, I fixed that and am not receiving the same error, but with a different index number (5).
What do you expect to happen?
I expect to receive a retention raster with data. I am receiving empty outputs.
What have you tried so far?
I reclassified the land use raster to correct the object id to match the lucode to ensure it also started at 0. Now, it is not giving me an error related to that parameter, but giving me an error potentially with the hydrologic soil group raster. I checked the object Id column for the HSG raster and the index starts at 0 as it should. I am not sure how to fix this issue to receive an output with data included.
Upload the logfile using the
button
I can not find the âoutbox_tray: buttonâ. Here is a copy of the error message:
06/19/2024 12:52:17 natcap.invest.utils Level 100 Writing log messages to [C:\WatershedMaps\HeadwatersSwiftCreek_Watersh\InVEST-natcap.invest.stormwater-log-2024-06-19â12_52_17.txt]
06/19/2024 12:52:17 main Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.stormwater 3.14.2:
adjust_retention_ratios True
aggregate_areas_path C:\WatershedMaps\HeadwatersSwiftCreek_Watersh\Headwaters_Boundary.shp
biophysical_table C:\WatershedMaps\HeadwatersSwiftCreek_Watersh\Headwaters_BIO.csv
lulc_path C:\WatershedMaps\HeadwatersSwiftCreek_Watersh\Processed_Headwtr_2001LU.tif
n_workers -1
precipitation_path C:\WatershedMaps\HeadwatersSwiftCreek_Watersh\Processed_Headwater_Prcpt.tif
replacement_cost 10000
results_suffix
retention_radius 564000000
road_centerlines_path C:\WatershedMaps\HeadwatersSwiftCreek_Watersh\Processed_headwtr_rds.shp
soil_group_path C:\WatershedMaps\HeadwatersSwiftCreek_Watersh\processed_HSC_headwter.tif
workspace_dir C:\WatershedMaps\HeadwatersSwiftCreek_Watersh
06/19/2024 12:52:17 py.warnings WARNING osgeo\gdal.py:312: FutureWarning: Neither gdal.UseExceptions() nor gdal.DontUseExceptions() has been explicitly called. In GDAL 4.0, exceptions will be enabled by default.
06/19/2024 12:52:17 pygeoprocessing.geoprocessing INFO 1 of 3 aligned: lulc_aligned.tif
06/19/2024 12:52:17 pygeoprocessing.geoprocessing INFO 2 of 3 aligned: soil_group_aligned.tif
06/19/2024 12:52:17 pygeoprocessing.geoprocessing INFO 3 of 3 aligned: precipitation_aligned.tif
06/19/2024 12:52:17 pygeoprocessing.geoprocessing INFO aligned all 3 rasters.
06/19/2024 12:52:17 pygeoprocessing.geoprocessing INFO starting stats_worker
06/19/2024 12:52:17 pygeoprocessing.geoprocessing INFO started stats_worker <Thread(Thread-1 (stats_worker), started daemon 10704)>
06/19/2024 12:52:17 pygeoprocessing.geoprocessing ERROR exception encountered in raster_calculator
Traceback (most recent call last):
File âpygeoprocessing\geoprocessing.pyâ, line 495, in raster_calculator
File âpygeoprocessing\geoprocessing.pyâ, line 728, in apply_op
File ânatcap\invest\stormwater.pyâ, line 869, in
IndexError: index 5 is out of bounds for axis 1 with size 5
06/19/2024 12:52:17 pygeoprocessing.geoprocessing INFO Waiting for raster stats worker result.
06/19/2024 12:52:17 pygeoprocessing.geoprocessing_core WARNING No valid pixels were received, sending None.
06/19/2024 12:52:17 taskgraph.Task ERROR Something went wrong when adding task calculate stormwater retention ratio (1), terminating taskgraph.
Traceback (most recent call last):
File âtaskgraph\Task.pyâ, line 674, in add_task
File âtaskgraph\Task.pyâ, line 1093, in _call
File ânatcap\invest\stormwater.pyâ, line 868, in lookup_ratios
File âpygeoprocessing\geoprocessing.pyâ, line 731, in raster_map
File âpygeoprocessing\geoprocessing.pyâ, line 495, in raster_calculator
File âpygeoprocessing\geoprocessing.pyâ, line 728, in apply_op
File ânatcap\invest\stormwater.pyâ, line 869, in
IndexError: index 5 is out of bounds for axis 1 with size 5
06/19/2024 12:52:17 natcap.invest.utils ERROR Exception while executing natcap.invest.stormwater
Traceback (most recent call last):
File ânatcap\invest\utils.pyâ, line 165, in prepare_workspace
File âinvest\cli.pyâ, line 470, in main
File ânatcap\invest\stormwater.pyâ, line 509, in execute
File âtaskgraph\Task.pyâ, line 674, in add_task
File âtaskgraph\Task.pyâ, line 1093, in _call
File ânatcap\invest\stormwater.pyâ, line 868, in lookup_ratios
File âpygeoprocessing\geoprocessing.pyâ, line 731, in raster_map
File âpygeoprocessing\geoprocessing.pyâ, line 495, in raster_calculator
File âpygeoprocessing\geoprocessing.pyâ, line 728, in apply_op
File ânatcap\invest\stormwater.pyâ, line 869, in
IndexError: index 5 is out of bounds for axis 1 with size 5
06/19/2024 12:52:17 natcap.invest.utils INFO Elapsed time: 0.25s
06/19/2024 12:52:17 natcap.invest.utils INFO Execution finished; version: 3.14.2