Habitat Quality task rasterize_access taskgraph


I am trying to run a Habitat Quality model in InVEST, but I am getting the following error message:

ERROR Something went wrong when adding task rasterize_access (5), terminating taskgraph.

I am getting this error when trying to run the Habitat Quality model in InVEST. The model does not run and does not generate output rasters. I have tried running the model with the tables as per the InVEST guide. I am using an older version of InVEST. I can provide more information about the model and the tables I have used, as well as the rasters.

Thank you for any help you can provide in solving this issue.

2023-09-25 10:40:16,971 (natcap.invest.utils) utils.prepare_workspace(124) INFO Writing log messages to C:\Users\DELL\Desktop\RESPALDOS2023\Documents\UPS\INVEST\DATOS DE SALIDA\HQ\InVEST-natcap.invest.habitat_quality-log-2023-09-25–10_40_16.txt
2023-09-25 10:40:16,971 (main) cli.main(521) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.habitat_quality 3.9.0.post235+g296690d7:
half_saturation_constant 0.05
lulc_cur_path C:\Users\DELL\Desktop\RESPALDOS2023\Documents\UPS\INVEST\BASE DE DATOS\2019_lu.tif
n_workers -1
sensitivity_table_path C:\Users\DELL\Desktop\RESPALDOS2023\Documents\UPS\INVEST\BASE DE DATOS\HQ\sensitivity.csv
threats_table_path C:\Users\DELL\Desktop\RESPALDOS2023\Documents\UPS\INVEST\BASE DE DATOS\HQ\threats.csv
workspace_dir C:\Users\DELL\Desktop\RESPALDOS2023\Documents\UPS\INVEST\DATOS DE SALIDA\HQ

2023-09-25 10:40:16,971 (natcap.invest.habitat_quality) habitat_quality.execute(246) INFO Starting execute of Habitat Quality model.
2023-09-25 10:40:16,971 (natcap.invest.habitat_quality) habitat_quality.execute(252) INFO Creating workspace
2023-09-25 10:40:16,979 (natcap.invest.habitat_quality) habitat_quality.execute(265) INFO Checking Threat and Sensitivity tables for compliance
2023-09-25 10:40:17,019 (natcap.invest.habitat_quality) habitat_quality.execute(292) INFO Validate threat rasters and collect unique LULC codes
2023-09-25 10:40:17,051 (natcap.invest.habitat_quality) habitat_quality.execute(356) INFO Checking threat raster values are valid ( 0 <= x <= 1 ).
2023-09-25 10:40:17,051 (natcap.invest.habitat_quality) habitat_quality.execute(367) INFO Aligning and resizing land cover and threat rasters
2023-09-25 10:40:17,131 (natcap.invest.habitat_quality) habitat_quality.execute(420) INFO Starting habitat_quality biophysical calculations
2023-09-25 10:40:17,139 (taskgraph.Task) Task.add_task(779) ERROR Something went wrong when adding task rasterize_access (5), terminating taskgraph.
Traceback (most recent call last):
File “taskgraph\Task.py”, line 747, in add_task
File “taskgraph\Task.py”, line 1234, in _call
File “pygeoprocessing\geoprocessing.py”, line 2140, in rasterize
AttributeError: ‘NoneType’ object has no attribute ‘GetLayer’
2023-09-25 10:40:17,139 (natcap.invest.utils) utils.prepare_workspace(129) INFO Elapsed time: 0.17s

Hello @Christian_30 and welcome to the forums!

This error happens when a vector either cannot be found or is already open in a program, such as a GIS software. Could you verify that any files referenced in your threats table are at the correct locations? And then could you make sure that none of these vectors are open in a program such as a GIS?


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