This forum is shutting down! Please post new discussions at community.naturalcapitalproject.org

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
    Hello,

    Thanks for sending your inputs!  I've tried running HQ and strangely, I'm unable to reproduce this error.  There is another issue, though, which is that your sensitivity table is missing entries for lulc codes 51, 52, 53, 65 and 66.  Could you make sure that your table has entries for all of these landcover codes and try re-running?  I wonder if that'll correct this odd issue as well.  Let us know how this goes,

    James
Sign In or Register to comment.