HabitatQuality _queue.Empty error during convolutions


I’m having some trouble to run the HQ model to four watersheds.

First it seems to be ok, but after starting the convolution of the first threat raster, the model ends up with an error message.

Could someone point what am I doing wrong?

Thanks a lot :slightly_smiling_face:

02/07/2023 11:25:08 main Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.habitat_quality 3.12.0:
access_vector_path D:\Doutorado\Geo\Inputs_cap2_fernanda\Habitat_quality\med_araguaia\accessibility.shp
half_saturation_constant 0.05
lulc_bas_path D:\Doutorado\Geo\Inputs_cap2_fernanda\med_araguaia\lulc_med_araguaia_proj22S_BASELINE.tif
lulc_cur_path D:\Doutorado\Geo\Inputs_cap2_fernanda\med_araguaia\lulc2021_wgs84_UTM22S.tif
n_workers -1
results_suffix araguaia
sensitivity_table_path D:\Doutorado\Geo\Inputs_cap2_fernanda\Habitat_quality\med_araguaia\sensitivity.csv
threats_table_path D:\Doutorado\Geo\Inputs_cap2_fernanda\Habitat_quality\med_araguaia\threats.csv
workspace_dir D:\Doutorado\Geo\Inputs_cap2_fernanda\Habitat_quality\med_araguaia

02/07/2023 11:25:08 natcap.invest.habitat_quality INFO Starting execute of Habitat Quality model.
02/07/2023 11:25:08 natcap.invest.habitat_quality INFO Creating workspace
02/07/2023 11:25:09 natcap.invest.habitat_quality INFO Checking Threat and Sensitivity tables for compliance
02/07/2023 11:25:09 natcap.invest.utils WARNING Empty or NaN values were found in the table: D:\Doutorado\Geo\Inputs_cap2_fernanda\Habitat_quality\med_araguaia\threats.csv.
02/07/2023 11:25:09 natcap.invest.habitat_quality INFO Validate threat rasters and collect unique LULC codes
02/07/2023 11:25:17 natcap.invest.habitat_quality INFO Checking threat raster values are valid ( 0 <= x <= 1 ).
02/07/2023 11:25:17 natcap.invest.habitat_quality INFO Aligning and resizing land cover and threat rasters
02/07/2023 11:25:22 pygeoprocessing.geoprocessing INFO 1 of 7 aligned: lulc2021_wgs84_UTM22S_aligned_araguaia.tif
02/07/2023 11:25:25 pygeoprocessing.geoprocessing INFO 2 of 7 aligned: med_araguaia_desmatamento2021_aligned_araguaia.tif
02/07/2023 11:25:28 pygeoprocessing.geoprocessing INFO 3 of 7 aligned: med_araguaia_rodovia_proj22s_aligned_araguaia.tif
02/07/2023 11:25:32 pygeoprocessing.geoprocessing INFO 4 of 7 aligned: med_araguaia_pastagem2021_proj22s_aligned_araguaia.tif
02/07/2023 11:25:35 pygeoprocessing.geoprocessing INFO 5 of 7 aligned: med_araguaia_soja2021_proj22s_aligned_araguaia.tif
02/07/2023 11:25:39 pygeoprocessing.geoprocessing INFO 6 of 7 aligned: med_araguaia_areaurbana2021_proj22s_aligned_araguaia.tif
02/07/2023 11:25:45 pygeoprocessing.geoprocessing INFO 7 of 7 aligned: lulc_med_araguaia_proj22S_BASELINE_aligned_araguaia.tif
02/07/2023 11:25:45 pygeoprocessing.geoprocessing INFO aligned all 7 rasters.
02/07/2023 11:25:45 natcap.invest.habitat_quality INFO Starting habitat_quality biophysical calculations
02/07/2023 11:25:52 natcap.invest.habitat_quality INFO Calculating habitat quality for landuse: D:\Doutorado\Geo\Inputs_cap2_fernanda\Habitat_quality\med_araguaia\intermediate\lulc2021_wgs84_UTM22S_aligned_araguaia.tif
02/07/2023 11:25:52 pygeoprocessing.geoprocessing INFO starting stats_worker
02/07/2023 11:25:52 pygeoprocessing.geoprocessing INFO started stats_worker
02/07/2023 11:25:58 pygeoprocessing.geoprocessing INFO 68.1% complete
02/07/2023 11:26:00 pygeoprocessing.geoprocessing INFO 100.0% complete
02/07/2023 11:26:00 pygeoprocessing.geoprocessing INFO Waiting for raster stats worker result.
02/07/2023 11:26:05 pygeoprocessing.geoprocessing INFO starting convolve
02/07/2023 11:26:05 pygeoprocessing.geoprocessing INFO 498624 sent to workers, wait for worker results
02/07/2023 11:26:10 pygeoprocessing.geoprocessing INFO convolution worker approximately 0.0% complete on filtered_conversion_c_araguaia.tif
02/07/2023 11:26:15 pygeoprocessing.geoprocessing INFO convolution worker approximately 0.1% complete on filtered_conversion_c_araguaia.tif

02/07/2023 14:01:09 pygeoprocessing.geoprocessing INFO convolution worker approximately 44.3% complete on filtered_conversion_c_araguaia.tif
02/07/2023 14:02:10 taskgraph.Task ERROR Something went wrong when adding task convolve_exponential_c_conversion (10), 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 “pygeoprocessing\geoprocessing.py”, line 2733, in convolve_2d
File “queue.py”, line 179, in get
02/07/2023 14:02:10 natcap.invest.utils ERROR Exception while executing natcap.invest.habitat_quality
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “invest\cli.py”, line 486, in main
File “natcap\invest\habitat_quality.py”, line 548, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “pygeoprocessing\geoprocessing.py”, line 2733, in convolve_2d
File “queue.py”, line 179, in get
02/07/2023 14:02:10 natcap.invest.utils INFO Elapsed time: 2h 37m 2.2399999999997817s
02/07/2023 14:02:10 natcap.invest.utils INFO Execution finished

InVEST-natcap.invest.habitat_quality-log-2023-02-07–11_25_08.txt (157.9 KB)

Hello! I tried to delete this topic because the mistery was solved… it was a problem with the sensitivity table, some LULC value from baseline LULC map was lacking and a column of the threats table shouldn’t be there. I’m sorry about my English too, i can read and understand well, but I write like thinking in Portuguese :sweat_smile :sweat_smile: . Best regards.

1 Like

Thanks @fernandanunes for the question and welcome to the NatCap forum community. I’m glad that you were able to sort it out!



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