What is the issue or question you have?
I continue to get basic errors when trying to run the Nature Access Model. I am using an urban green space raster clipped to the extent of Los Angeles City. There are five land use attributes 0-4 (Zero is no urban nature, 1-4 is urban nature of different types), where lu attributes 2-4 have a nature access value of 1, and all others have zero. I am using the same search distance for all attributes.
The population raster is from the EPA Dasymetric population data, also clipped to LA, and the administrative boundary is the city boundaries of Los Angeles.
What do you expect to happen?
I expect it to run and provide me the nature supply and demand outputs
What have you tried so far?
I have ran the model using a similar LU raster, but with only 4 attributes, excluding the zero-data attribute for no-data
Attach the logfile here:
05/02/2023 14:18:05 natcap.invest.urban_nature_access INFO Starting Urban Nature Access Model
05/02/2023 14:18:05 natcap.invest.urban_nature_access INFO Using decay function dichotomy
05/02/2023 14:18:05 pygeoprocessing.geoprocessing INFO starting stats_worker
05/02/2023 14:18:05 pygeoprocessing.geoprocessing INFO started stats_worker <Thread(Thread-1 (stats_worker), started daemon 14480)>
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO 100.0% complete
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO Waiting for raster stats worker result.
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO starting stats_worker
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO started stats_worker <Thread(Thread-2 (stats_worker), started daemon 15140)>
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO 100.0% complete
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO Waiting for raster stats worker result.
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO starting stats_worker
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO started stats_worker <Thread(Thread-3 (stats_worker), started daemon 10856)>
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO 100.0% complete
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO Waiting for raster stats worker result.
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO starting stats_worker
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO started stats_worker <Thread(Thread-4 (stats_worker), started daemon 12516)>
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO 100.0% complete
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO Waiting for raster stats worker result.
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO starting stats_worker
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO started stats_worker <Thread(Thread-5 (stats_worker), started daemon 2016)>
05/02/2023 14:18:06 pygeoprocessing.geoprocessing ERROR exception encountered in raster_calculator
Traceback (most recent call last):
File “pygeoprocessing\geoprocessing.py”, line 517, in raster_calculator
File “natcap\invest\urban_nature_access.py”, line 2612, in _mask
TypeError: int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’
05/02/2023 14:18:06 pygeoprocessing.geoprocessing INFO Waiting for raster stats worker result.
05/02/2023 14:18:06 pygeoprocessing.geoprocessing_core WARNING No valid pixels were received, sending None.
05/02/2023 14:18:06 taskgraph.Task ERROR Something went wrong when adding task Mask lulc to the known valid pixels (4), 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\urban_nature_access.py”, line 2615, in _mask_raster
File “pygeoprocessing\geoprocessing.py”, line 517, in raster_calculator
File “natcap\invest\urban_nature_access.py”, line 2612, in _mask
TypeError: int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’
05/02/2023 14:18:06 natcap.invest.utils ERROR Exception while executing natcap.invest.urban_nature_access
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “invest\cli.py”, line 469, in main
File “natcap\invest\urban_nature_access.py”, line 781, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\urban_nature_access.py”, line 2615, in _mask_raster
File “pygeoprocessing\geoprocessing.py”, line 517, in raster_calculator
File “natcap\invest\urban_nature_access.py”, line 2612, in _mask
TypeError: int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’
05/02/2023 14:18:06 natcap.invest.utils INFO Elapsed time: 0.43s
05/02/2023 14:18:06 natcap.invest.utils INF