nonetype object has no attribute getblocksize

Hi, I'm trying to run a HQ model but it shows “nonetype object has no attribute getblocksize”.
Here is the entire logfile:

Initializing...

Showing messages with level INFO and higher

01/29/2019 00:17:13 natcap.invest.utils INFO Writing log messages to C:\Users\xlk87\Desktop\habitat quality1995\InVEST-Habitat-Quality-log-2019-01-29--00_17_13.txt

01/29/2019 00:17:13 natcap.invest.ui.model Level 100 Starting model with parameters:

Arguments for InVEST natcap.invest.habitat_quality 3.5.0:

half_saturation_constant 0.5

landuse_cur_uri C:/Users/xlk87/Desktop/栅格数据土地利用/1995/jiangsu1995.tif

landuse_fut_uri C:/Users/xlk87/Desktop/1995/jiangsu2000/jiangsu2000.tif

results_suffix

sensitivity_uri C:/Users/xlk87/Desktop/sensitivity_samp.csv

threat_raster_folder C:\Users\xlk87\Desktop\1995

threats_uri C:/Users/xlk87/Desktop/threats_samp.csv

workspace_dir C:\Users\xlk87\Desktop\habitat quality1995


01/29/2019 00:17:13 osgeo ERROR [errno 1] C:\Users\xlk87\Desktop\habitat quality1995\intermediate\habitat__f.tif, band 1: Failed to compute statistics, no valid pixels found in sampling.

01/29/2019 00:17:13 natcap.invest.pygeoprocessing_0_3_3.geoprocessing INFO starting convolve

01/29/2019 00:17:13 osgeo ERROR [errno 1] C:\Users\xlk87\Desktop\habitat quality1995\intermediate\sens_roads_f.tif, band 1: Failed to compute statistics, no valid pixels found in sampling.

01/29/2019 00:17:18 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x1BE1A730>

Traceback (most recent call last):

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\ui\model.py", line 1541, in _logged_target

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\habitat_quality.py", line 256, in execute

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\geoprocessing.py", line 3037, in convolve_2d_uri

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\geoprocessing.py", line 342, in new_raster_from_base_uri

File "src\natcap\invest\pygeoprocessing_0_3_3\geoprocessing_core.pyx", line 431, in natcap.invest.pygeoprocessing_0_3_3.geoprocessing_core.new_raster_from_base_uri

File "src\natcap\invest\pygeoprocessing_0_3_3\geoprocessing_core.pyx", line 482, in natcap.invest.pygeoprocessing_0_3_3.geoprocessing_core.new_raster_from_base

AttributeError: 'NoneType' object has no attribute 'GetBlockSize'

01/29/2019 00:17:18 natcap.invest.ui.model INFO Execution finished

01/29/2019 00:17:18 natcap.invest.utils INFO Elapsed time: 4.76s

01/29/2019 00:17:18 natcap.invest.ui.execution ERROR Target <function _logged_target at 0x22D29270> failed with exception

Traceback (most recent call last):

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\ui\execution.py", line 68, in run

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\ui\model.py", line 1541, in _logged_target

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\habitat_quality.py", line 256, in execute

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\geoprocessing.py", line 3037, in convolve_2d_uri

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\geoprocessing.py", line 342, in new_raster_from_base_uri

File "src\natcap\invest\pygeoprocessing_0_3_3\geoprocessing_core.pyx", line 431, in natcap.invest.pygeoprocessing_0_3_3.geoprocessing_core.new_raster_from_base_uri

File "src\natcap\invest\pygeoprocessing_0_3_3\geoprocessing_core.pyx", line 482, in natcap.invest.pygeoprocessing_0_3_3.geoprocessing_core.new_raster_from_base

AttributeError: 'NoneType' object has no attribute 'GetBlockSize'

01/29/2019 00:17:18 natcap.invest.ui.execution INFO Execution finished


What's wrong with this? Thank you!

Comments

  • jdouglassjdouglass Administrator, NatCap Staff
    Well this is actually kind of an interesting error!  So, the model has opened the raster and is attempting to get the first band, but for some reason it can't (which is not something I've seen before).  Could you send your inputs to jdouglass@stanford.edu so I can take a look?

    Thanks,
    James
Sign In or Register to comment.