When I run this model I receiving a “AttributeError” message that says ‘NoneType’ object has no attribute ‘SetGeoTransform’. I have no idea what to do or what it is related to.
log file is included below
2022-05-22 13:57:22,214 (natcap.invest.utils) utils.prepare_workspace(162) Level 100 Writing log messages to F:/GH/0522/SJFX\InVEST-Habitat-Quality-log-2022-05-22–13_57_22.txt
2022-05-22 13:57:22,217 (natcap.invest.ui.model) model._logged_target(1643) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.habitat_quality 3.10.2:
half_saturation_constant 0.5
lulc_cur_path F:/GH/0522/reClass.tif
n_workers -1
results_suffix
sensitivity_table_path F:/GH/0522/sensituvity.csv
threats_table_path F:/GH/0522/threats.csv
workspace_dir F:/GH/0522/SJFX
2022-05-22 13:57:22,217 (natcap.invest.habitat_quality) habitat_quality.execute(259) INFO Starting execute of Habitat Quality model.
2022-05-22 13:57:22,218 (natcap.invest.habitat_quality) habitat_quality.execute(265) INFO Creating workspace
2022-05-22 13:57:22,276 (natcap.invest.habitat_quality) habitat_quality.execute(278) INFO Checking Threat and Sensitivity tables for compliance
2022-05-22 13:57:22,293 (natcap.invest.habitat_quality) habitat_quality.execute(305) INFO Validate threat rasters and collect unique LULC codes
2022-05-22 13:57:22,293 (natcap.invest.habitat_quality) habitat_quality.execute(323) DEBUG Validating path for threat: crop
2022-05-22 13:57:23,032 (natcap.invest.habitat_quality) habitat_quality.execute(323) DEBUG Validating path for threat: home
2022-05-22 13:57:23,632 (natcap.invest.habitat_quality) habitat_quality.execute(323) DEBUG Validating path for threat: road
2022-05-22 13:57:24,210 (natcap.invest.habitat_quality) habitat_quality.execute(367) INFO Checking threat raster values are valid ( 0 <= x <= 1 ).
2022-05-22 13:57:24,212 (natcap.invest.habitat_quality) habitat_quality.execute(378) INFO Aligning and resizing land cover and threat rasters
2022-05-22 13:57:24,219 (natcap.invest.habitat_quality) habitat_quality.execute(401) DEBUG Raster paths for aligning: [‘F:/GH/0522/SJFX\intermediate\reClass_aligned.tif’, ‘F:/GH/0522/SJFX\intermediate\crop_c_aligned.tif’, ‘F:/GH/0522/SJFX\intermediate\home_c_aligned.tif’, ‘F:/GH/0522/SJFX\intermediate\road_c_aligned.tif’]
2022-05-22 13:57:24,272 (pygeoprocessing.geoprocessing) geoprocessing.align_and_resize_raster_stack(697) DEBUG assuming manual bounding box mode of [119.91729498301636, 35.62199682316142, 119.93583441172736, 35.63953578790986]
2022-05-22 13:57:25,872 (pygeoprocessing.geoprocessing) geoprocessing.align_and_resize_raster_stack(824) INFO 1 of 4 aligned: reClass_aligned.tif
2022-05-22 13:57:27,040 (pygeoprocessing.geoprocessing) geoprocessing.align_and_resize_raster_stack(824) INFO 2 of 4 aligned: crop_c_aligned.tif
2022-05-22 13:57:28,257 (pygeoprocessing.geoprocessing) geoprocessing.align_and_resize_raster_stack(824) INFO 3 of 4 aligned: home_c_aligned.tif
2022-05-22 13:57:29,469 (pygeoprocessing.geoprocessing) geoprocessing.align_and_resize_raster_stack(824) INFO 4 of 4 aligned: road_c_aligned.tif
2022-05-22 13:57:29,469 (pygeoprocessing.geoprocessing) geoprocessing.align_and_resize_raster_stack(828) INFO aligned all 4 rasters.
2022-05-22 13:57:29,578 (natcap.invest.habitat_quality) habitat_quality.execute(413) DEBUG Updating dict raster paths to reflect aligned paths
2022-05-22 13:57:29,578 (natcap.invest.habitat_quality) habitat_quality.execute(431) INFO Starting habitat_quality biophysical calculations
2022-05-22 13:57:30,355 (natcap.invest.habitat_quality) habitat_quality.execute(475) INFO Calculating habitat quality for landuse: F:/GH/0522/SJFX\intermediate\reClass_aligned.tif
2022-05-22 13:57:30,372 (pygeoprocessing.geoprocessing) geoprocessing.raster_calculator(396) INFO starting stats_worker
2022-05-22 13:57:30,406 (pygeoprocessing.geoprocessing_core) threading.run(870) DEBUG stats worker PID: 14304
2022-05-22 13:57:30,406 (pygeoprocessing.geoprocessing) geoprocessing.raster_calculator(402) INFO started stats_worker <Thread(Thread-103, started daemon 15132)>
2022-05-22 13:57:31,874 (pygeoprocessing.geoprocessing) geoprocessing.raster_calculator(482) INFO 100.0% complete
2022-05-22 13:57:31,874 (pygeoprocessing.geoprocessing) geoprocessing.raster_calculator(485) INFO Waiting for raster stats worker result.
2022-05-22 13:57:32,643 (natcap.invest.habitat_quality) habitat_quality.execute(509) DEBUG Calculating threat: crop.
Threat data: {‘threat’: ‘crop’, ‘max_dist’: 1, ‘weight’: 0.2, ‘decay’: ‘linear’, ‘cur_path’: ‘crop_c.tif’}
2022-05-22 13:57:32,650 (natcap.invest.habitat_quality) habitat_quality._create_decay_kernel(881) DEBUG Max distance in pixels: 372827022.2210791
2022-05-22 13:57:32,664 (osgeo) utils._log_gdal_errors(98) ERROR [errno 3] F:/GH/0522/SJFX\intermediate\kernels\kernel_crop_c.tif: Free disk space available is 300829720576 bytes, whereas 2223999819299448064 are at least necessary. You can disable this check by defining the CHECK_DISK_FREE_SPACE configuration option to FALSE.
2022-05-22 13:57:32,665 (taskgraph.Task) Task.add_task(706) ERROR Something went wrong when adding task decay_kernel_linear_c_crop (6), 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\habitat_quality.py”, line 895, in _create_decay_kernel
File “natcap\invest\habitat_quality.py”, line 946, in _make_linear_decay_kernel_path
AttributeError: ‘NoneType’ object has no attribute ‘SetGeoTransform’
2022-05-22 13:57:32,672 (natcap.invest.utils) utils.prepare_workspace(167) ERROR Exception while executing Habitat-Quality
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 165, in prepare_workspace
File “natcap\invest\ui\model.py”, line 1649, in _logged_target
File “natcap\invest\habitat_quality.py”, line 534, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\habitat_quality.py”, line 895, in _create_decay_kernel
File “natcap\invest\habitat_quality.py”, line 946, in _make_linear_decay_kernel_path
AttributeError: ‘NoneType’ object has no attribute ‘SetGeoTransform’
2022-05-22 13:57:32,673 (natcap.invest.utils) utils.prepare_workspace(170) INFO Elapsed time: 10.46s
2022-05-22 13:57:32,674 (natcap.invest.utils) utils.prepare_workspace(173) INFO Execution finished
InVEST version
3.10.2