What is the issue or question you have? An error shows while running the NDR model.
What do you expect to happen? find the place of occurrence of error.
What have you tried so far? Tried several times by changing type of csv table.
Attach the logfile here:11/28/2023 09:24:11 natcap. invest.utils Level 100 Writing log messages to [D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR\InVEST-Nutrient-Delivery-Ratio-log-2023-11-28–09_24_11.txt]
11/28/2023 09:24:11 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.ndr.ndr 3.12.0:
biophysical_table_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/NDR _Biophysical Table.csv
calc_n True
calc_p False
dem_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/DEM.tif
k_param 2
lulc_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/LU.tif
n_workers -1
results_suffix
runoff_proxy_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Annual_RF.tif
subsurface_critical_length_n 150
subsurface_eff_n 0.8
threshold_flow_accumulation 1000
watersheds_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Watershed1.shp
workspace_dir D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR
11/28/2023 09:24:21 pygeoprocessing.geoprocessing ERROR exception encountered in raster_calculator
Traceback (most recent call last):
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:24:21 taskgraph.Task ERROR Something went wrong when adding task map surface load n (19), 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\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:24:21 natcap.invest.utils ERROR Exception while executing Nutrient-Delivery-Ratio
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “natcap\invest\ui\model.py”, line 1632, in _logged_target
File “natcap\invest\ndr\ndr.py”, line 562, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:42:43 natcap.invest.utils Level 100 Writing log messages to [D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR\InVEST-Nutrient-Delivery-Ratio-log-2023-11-28–09_42_43.txt]
11/28/2023 09:42:43 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.ndr.ndr 3.12.0:
biophysical_table_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/NDR _Biophysical Table.csv
calc_n True
calc_p False
dem_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/DEM.tif
k_param 2
lulc_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/LU.tif
n_workers -1
results_suffix
runoff_proxy_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Annual_RF.tif
subsurface_critical_length_n 150
subsurface_eff_n 0.8
threshold_flow_accumulation 1000
watersheds_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Watershed1.shp
workspace_dir D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR
11/28/2023 09:42:43 pygeoprocessing.geoprocessing ERROR exception encountered in raster_calculator
Traceback (most recent call last):
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:42:43 taskgraph.Task ERROR Something went wrong when adding task map surface load n (19), 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\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:42:43 natcap.invest.utils ERROR Exception while executing Nutrient-Delivery-Ratio
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “natcap\invest\ui\model.py”, line 1632, in _logged_target
File “natcap\invest\ndr\ndr.py”, line 562, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:54:28 natcap.invest.utils Level 100 Writing log messages to [D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR\InVEST-Nutrient-Delivery-Ratio-log-2023-11-28–09_54_28.txt]
11/28/2023 09:54:28 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.ndr.ndr 3.12.0:
biophysical_table_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/NDR _Biophysical Table.csv
calc_n True
calc_p False
dem_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/DEM.tif
k_param 2
lulc_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/LU.tif
n_workers -1
results_suffix
runoff_proxy_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Annual_RF.tif
subsurface_critical_length_n 150
subsurface_eff_n 0.8
threshold_flow_accumulation 1000
watersheds_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Watershed1.shp
workspace_dir D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR
11/28/2023 09:54:31 pygeoprocessing.geoprocessing ERROR exception encountered in raster_calculator
Traceback (most recent call last):
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:54:31 taskgraph.Task ERROR Something went wrong when adding task map surface load n (19), 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\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:54:31 natcap.invest.utils ERROR Exception while executing Nutrient-Delivery-Ratio
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “natcap\invest\ui\model.py”, line 1632, in _logged_target
File “natcap\invest\ndr\ndr.py”, line 562, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:57:37 natcap.invest.utils Level 100 Writing log messages to [D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR\InVEST-Nutrient-Delivery-Ratio-log-2023-11-28–09_57_37.txt]
11/28/2023 09:57:37 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.ndr.ndr 3.12.0:
biophysical_table_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/NDR _Biophysical Table.csv
calc_n True
calc_p False
dem_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/DEM.tif
k_param 2
lulc_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/LU.tif
n_workers -1
results_suffix
runoff_proxy_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Annual_RF.tif
subsurface_critical_length_n 150
subsurface_eff_n 0.8
threshold_flow_accumulation 1000
watersheds_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Watershed1.shp
workspace_dir D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR
11/28/2023 09:57:38 pygeoprocessing.geoprocessing ERROR exception encountered in raster_calculator
Traceback (most recent call last):
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:57:38 taskgraph.Task ERROR Something went wrong when adding task map surface load n (19), 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\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 09:57:38 natcap.invest.utils ERROR Exception while executing Nutrient-Delivery-Ratio
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “natcap\invest\ui\model.py”, line 1632, in _logged_target
File “natcap\invest\ndr\ndr.py”, line 562, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 10:06:20 natcap.invest.utils Level 100 Writing log messages to [D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR\InVEST-Nutrient-Delivery-Ratio-log-2023-11-28–10_06_20.txt]
11/28/2023 10:06:20 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.ndr.ndr 3.12.0:
biophysical_table_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/NDR _Biophysical Table.csv
calc_n True
calc_p False
dem_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/DEM.tif
k_param 2
lulc_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/LU.tif
n_workers -1
results_suffix
runoff_proxy_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Annual_RF.tif
subsurface_critical_length_n 150
subsurface_eff_n 0.8
threshold_flow_accumulation 1000
watersheds_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Watershed1.shp
workspace_dir D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR
11/28/2023 10:06:20 natcap.invest.utils ERROR ‘key_field’ : ‘lucode’ could not be found as a column in the table. Table path: D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/NDR _Biophysical Table.csv.
11/28/2023 10:06:20 natcap.invest.utils ERROR Exception while executing Nutrient-Delivery-Ratio
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “natcap\invest\ui\model.py”, line 1632, in _logged_target
File “natcap\invest\ndr\ndr.py”, line 370, in execute
File “natcap\invest\utils.py”, line 554, in build_lookup_from_csv
File “pandas\util_decorators.py”, line 311, in wrapper
File “pandas\core\frame.py”, line 5503, in set_index
KeyError: “None of [‘lucode’] are in the columns”
11/28/2023 10:07:19 natcap.invest.utils Level 100 Writing log messages to [D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR\InVEST-Nutrient-Delivery-Ratio-log-2023-11-28–10_07_19.txt]
11/28/2023 10:07:19 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.ndr.ndr 3.12.0:
biophysical_table_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/NDR _Biophysical Table.csv
calc_n True
calc_p False
dem_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/DEM.tif
k_param 2
lulc_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/LU.tif
n_workers -1
results_suffix
runoff_proxy_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Annual_RF.tif
subsurface_critical_length_n 150
subsurface_eff_n 0.8
threshold_flow_accumulation 1000
watersheds_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Watershed1.shp
workspace_dir D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR
11/28/2023 10:07:19 pygeoprocessing.geoprocessing ERROR exception encountered in raster_calculator
Traceback (most recent call last):
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 10:07:19 taskgraph.Task ERROR Something went wrong when adding task map surface load n (19), 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\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 10:07:19 natcap.invest.utils ERROR Exception while executing Nutrient-Delivery-Ratio
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “natcap\invest\ui\model.py”, line 1632, in _logged_target
File “natcap\invest\ndr\ndr.py”, line 562, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 13:56:38 natcap.invest.utils Level 100 Writing log messages to [D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR\InVEST-Nutrient-Delivery-Ratio-log-2023-11-28–13_56_38.txt]
11/28/2023 13:56:38 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.ndr.ndr 3.12.0:
biophysical_table_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/NDR _Biophysical Table.csv
calc_n True
calc_p False
dem_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/DEM.tif
k_param 2
lulc_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/LU.tif
n_workers -1
results_suffix
runoff_proxy_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Annual_RF.tif
subsurface_critical_length_n 150
subsurface_eff_n 0.8
threshold_flow_accumulation 1000
watersheds_path D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR/Watershed1.shp
workspace_dir D:/Resource Info Sys/2023/Ecosystem services/Maragala/NDR
11/28/2023 13:56:43 pygeoprocessing.geoprocessing ERROR exception encountered in raster_calculator
Traceback (most recent call last):
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 13:56:43 taskgraph.Task ERROR Something went wrong when adding task map surface load n (19), 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\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
11/28/2023 13:56:43 natcap.invest.utils ERROR Exception while executing Nutrient-Delivery-Ratio
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “natcap\invest\ui\model.py”, line 1632, in _logged_target
File “natcap\invest\ndr\ndr.py”, line 562, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\ndr\ndr.py”, line 1085, in _map_surface_load
File “pygeoprocessing\geoprocessing.py”, line 443, in raster_calculator
File “natcap\invest\ndr\ndr.py”, line 1082, in _map_surface_load_op
numpy.core._exceptions._UFuncNoLoopError: ufunc ‘subtract’ did not contain a loop with signature matching types (dtype(‘int32’), dtype(‘<U32’)) → None
Pls help on recovering the error occurred.