Habitat quality in watersheds: ERROR Exiting due to failures

Hi,

I'm using InVEST 3.3.2 x86. I tried use the habitat quality model with my area of interest, following the instructions, but i'm getting an error message: exception found while running natcap.invest.habitat_quality. What could I do? I don't have any idea of how ti fix it.

Thank you very much!



Initializing...

01/26/2017 14:20:31 root DEBUG Loading <module 'natcap.invest.habitat_quality' from 'C:\INVEST~1.2_X\INVEST~1\natcap\invest\habitat_quality.pyc'> in frozen environment

Arguments:

half_saturation_constant 0.5

landuse_cur_uri C:/Users/chiar/Desktop/Qgis tesi/Progetto tesi/InVEST model/Habitat quality/input/LULCraster.tif

sensitivity_uri C:/Users/chiar/Desktop/Qgis tesi/Progetto tesi/InVEST model/Habitat quality/input/Sensitivity.csv

threat_raster_folder C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality\input

threats_uri C:/Users/chiar/Desktop/Qgis tesi/Progetto tesi/InVEST model/Habitat quality/input/Threat1.csv

workspace_dir C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality



01/26/2017 14:20:31 root INFO Logging will be saved to natcap.invest.habitat_quality-log-2017-01-26--14_20_31.txt

01/26/2017 14:20:31 root DEBUG Loaded the model from natcap.invest.habitat_quality

01/26/2017 14:20:31 root INFO Executing the loaded model

01/26/2017 14:20:31 root INFO Running InVEST version "3.3.2"

01/26/2017 14:20:31 root INFO Python architecture: ('32bit', 'WindowsPE')

01/26/2017 14:20:31 root INFO Disk space remaining for workspace: 21.04 GB

01/26/2017 14:20:31 root INFO Pointing temporary directory at the workspace at C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality

01/26/2017 14:20:31 root INFO Updating os.environ["TMP"]=C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality\tmp to C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality

01/26/2017 14:20:31 root INFO Updating os.environ["TEMP"]=C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality\tmp to C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality

01/26/2017 14:20:31 root INFO Updating os.environ["TMPDIR"]=C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality\tmp to C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality

01/26/2017 14:20:31 root INFO Setting tempfile.tempdir to C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality\tmp

01/26/2017 14:20:31 root INFO Starting natcap.invest.habitat_quality

01/26/2017 14:20:31 root ERROR ---------------------------------------------------

01/26/2017 14:20:31 root ERROR ---------------------- ERROR ----------------------

01/26/2017 14:20:31 root ERROR ---------------------------------------------------

01/26/2017 14:20:31 root ERROR Error: exception found while running natcap.invest.habitat_quality

01/26/2017 14:20:31 root DEBUG

01/26/2017 14:20:31 root DEBUG Build details

01/26/2017 14:20:31 root DEBUG Interpreter

01/26/2017 14:20:31 root DEBUG Current temp dir: C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality\tmp

01/26/2017 14:20:31 root DEBUG tempfile.tempdir: C:\Users\chiar\Desktop\Qgis tesi\Progetto tesi\InVEST model\Habitat quality\tmp

01/26/2017 14:20:31 root DEBUG

01/26/2017 14:20:31 root DEBUG System

01/26/2017 14:20:31 root DEBUG OS : Windows-8-6.2.9200

01/26/2017 14:20:31 root DEBUG Processor architecture: AMD64

01/26/2017 14:20:31 root DEBUG FS encoding : mbcs

01/26/2017 14:20:31 root DEBUG Preferred encoding: cp1252

01/26/2017 14:20:31 root DEBUG

01/26/2017 14:20:31 root DEBUG Python

01/26/2017 14:20:31 root DEBUG Version : 2.7.9

01/26/2017 14:20:31 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')

01/26/2017 14:20:31 root DEBUG Compiler : MSC v.1500 32 bit (Intel)

01/26/2017 14:20:31 root DEBUG Implementation : CPython

01/26/2017 14:20:31 root DEBUG Architecture : 32bit

01/26/2017 14:20:31 root DEBUG Linkage format : WindowsPE

01/26/2017 14:20:31 root DEBUG

01/26/2017 14:20:31 root DEBUG Packages

01/26/2017 14:20:31 root DEBUG Cython : ?

01/26/2017 14:20:31 root DEBUG Numpy : 1.11.2rc1

01/26/2017 14:20:31 root DEBUG Scipy : 0.16.1

01/26/2017 14:20:31 root DEBUG OSGEO : 1.11.3

01/26/2017 14:20:31 root DEBUG Shapely : 1.5.5

01/26/2017 14:20:31 root DEBUG InVEST : 3.3.2

01/26/2017 14:20:31 root DEBUG

01/26/2017 14:20:31 root DEBUG

01/26/2017 14:20:31 root DEBUG Exception not environment-related

01/26/2017 14:20:31 root DEBUG Printing traceback

Traceback (most recent call last):

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.iui.executor", line 560, in runModel

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.habitat_quality", line 89, in execute

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.geoprocessing", line 2522, in get_lookup_from_csv

Error: line contains NULL byte



01/26/2017 14:20:31 root ERROR Exiting due to failures

Comments

  • RichRich Administrator, NatCap Staff
    Strange!  This looks like it's encountering a weird value in your CSV table.   A simple guess might be "is the CSV table corrupt?"  But maybe the table really isn't a CSV table but some other format?

    If you can't see anything weird on your end, I'd be happy to look at your input data.  Can you dropbox to me at richsharp@stanford.edu?
  • I can't find any error in the csv files, I've just shared with you all the input data, 
    thank you very very much!
  • RichRich Administrator, NatCap Staff
    Thanks for sharing your data.  I opened up your sensitivity table in a text editor and saw a "NUL" byte at the end of the "Vivai in aree non irrigue" name on landcover type 107.  I deleted that byte, saved the file,  and got over that error.  I still wasn't able to run your model because it looked like a threat raster was missing (art_c) but that looks like it's just a naming convention on your part that you can fix.  (I see that you have art.tif right there, try renaming it to art_c...)

    Anyway, here's a link to your fixed sensitivity table https://www.dropbox.com/s/xccp4bxw5hrgyot/Sensitivity.csv?dl=0

    Let us know if we can help further!
  • Yes, it works perfectly! 
    I didn't name the threats "_c" at the end of the name in the csv file, but to work properly the raster file needed to be named "threat_c", after naming all the raster like that, it worked,
    Thank you!
Sign In or Register to comment.