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

Scenario Generator: Add factors to new land covers

AngeloAngelo Member
edited March 2016 in Pre/Post-Processing
Hello,
I am trying to generate a scenario which includes new land (Id 9, 10 and 24) covers by adding a quantity of area in area change field.
Additionally, I want to define in which conditions these new land covers will be addressed in the generated scenario, so I included some factors that affects them.
However, when I run the scenario generator I get an error (see below please) related to the new land covers (cover 9 in this case).
How to solve this?
Thanks,
ângelo

 
Initializing...

03/11/2016 15:14:33 root DEBUG PATH: ['C:\\InVEST_3_2_0_x86\\invest-3-x86\\.']

03/11/2016 15:14:33 root DEBUG Loading scenario_generator from PATH

Arguments:

calculate_constraints False

calculate_factors True

calculate_priorities False

calculate_proximity False

calculate_transition False

factor_inclusion 0

landcover C:/InVEST_3_2_0_x86/ScenarioGenerator/input/CenFloresta2/base2006test/hdr.adf

override_layer False

suffix 1

suitability C:/InVEST_3_2_0_x86/ScenarioGenerator/input/CenFloresta2/Factors/FactorsScenForest.csv

suitability_folder C:\InVEST_3_2_0_x86\ScenarioGenerator\input\CenFloresta2\Factors

transition C:/InVEST_3_2_0_x86/ScenarioGenerator/input/CenFloresta2/CenForest.csv

weight 0.9

workspace_dir C:\InVEST_3_2_0_x86\ScenarioGenerator\outputs_test



03/11/2016 15:14:33 root INFO Logging will be saved to scenario_generator-log-2016-03-11--15_14_33.txt

03/11/2016 15:14:33 root DEBUG Loaded the model from invest_natcap.scenario_generator.scenario_generator

03/11/2016 15:14:33 root INFO Executing the loaded model

03/11/2016 15:14:33 root INFO Running InVEST version "3.2.0"

03/11/2016 15:14:33 root INFO Python architecture: ('32bit', 'WindowsPE')

03/11/2016 15:14:33 root INFO Disk space remaining for workspace: 347.77 GB

03/11/2016 15:14:35 root INFO Pointing temporary directory at the workspace at C:\InVEST_3_2_0_x86\ScenarioGenerator\outputs_test

03/11/2016 15:14:35 root INFO Updating os.environ["TMP"]=C:\Users\LiGeo\AppData\Local\Temp to C:\InVEST_3_2_0_x86\ScenarioGenerator\outputs_test

03/11/2016 15:14:35 root INFO Updating os.environ["TEMP"]=C:\Users\LiGeo\AppData\Local\Temp to C:\InVEST_3_2_0_x86\ScenarioGenerator\outputs_test

03/11/2016 15:14:35 root INFO Setting os.environ["TMPDIR"]=C:\InVEST_3_2_0_x86\ScenarioGenerator\outputs_test

03/11/2016 15:14:35 root INFO Setting tempfile.tempdir to C:\InVEST_3_2_0_x86\ScenarioGenerator\outputs_test\tmp

03/11/2016 15:14:35 root INFO Starting scenario_generator

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator DEBUG Found reference to factor (mdt_quercus_final, Suit, 0) for cover 9.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator DEBUG Processing Polygon.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator INFO Rasterizing mdt_quercus_final using sutibality field Suit.

C:\InVEST_3_2_0_x86\invest-3-x86\.\invest_natcap\scenario_generator\scenario_generator.py:810: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator DEBUG Adding factor (mdt_quercus_final, Suit, 0) to cover 9 suitability list.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator DEBUG Found reference to factor (mdt_pinus_final, Suit, 0) for cover 10.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator DEBUG Processing Polygon.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator INFO Rasterizing mdt_pinus_final using sutibality field Suit.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator DEBUG Adding factor (mdt_pinus_final, Suit, 0) to cover 10 suitability list.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator DEBUG Found reference to factor (Rivers_Sabor, , 600) for cover 9.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator DEBUG Processing PolyLine.

03/11/2016 15:14:35 invest_natcap.scenario_generator.scenario_generator INFO Buffering rasterization of Rivers_Sabor to distance of 600.

03/11/2016 15:14:36 pygeoprocessing.geoprocessing WARNING this call is vectorizing which is deprecated and slow

03/11/2016 15:14:40 geoprocessing_cython INFO Distance Transform Phase 1

03/11/2016 15:14:40 geoprocessing_cython INFO Distance Transform Phase 2

03/11/2016 15:14:41 invest_natcap.scenario_generator.scenario_generator DEBUG Adding factor (Rivers_Sabor, , 600) to cover 9 suitability list.

03/11/2016 15:14:41 root ERROR ---------------------------------------------------

03/11/2016 15:14:41 root ERROR ---------------------- ERROR ----------------------

03/11/2016 15:14:41 root ERROR ---------------------------------------------------

03/11/2016 15:14:41 root ERROR Error: exception found while running scenario_generator

03/11/2016 15:14:41 root DEBUG

03/11/2016 15:14:41 root DEBUG Build details

03/11/2016 15:14:41 root DEBUG Interpreter

03/11/2016 15:14:41 root DEBUG Current temp dir: C:\InVEST_3_2_0_x86\ScenarioGenerator\outputs_test\tmp

03/11/2016 15:14:41 root DEBUG tempfile.tempdir: C:\InVEST_3_2_0_x86\ScenarioGenerator\outputs_test\tmp

03/11/2016 15:14:41 root DEBUG

03/11/2016 15:14:41 root DEBUG System

03/11/2016 15:14:41 root DEBUG OS : Windows-7-6.1.7601-SP1

03/11/2016 15:14:41 root DEBUG Processor architecture: x86

03/11/2016 15:14:41 root DEBUG FS encoding : mbcs

03/11/2016 15:14:41 root DEBUG Preferred encoding: cp1252

03/11/2016 15:14:41 root DEBUG

03/11/2016 15:14:41 root DEBUG Python

03/11/2016 15:14:41 root DEBUG Version : 2.7.9

03/11/2016 15:14:41 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')

03/11/2016 15:14:41 root DEBUG Compiler : MSC v.1500 32 bit (Intel)

03/11/2016 15:14:41 root DEBUG Implementation : CPython

03/11/2016 15:14:41 root DEBUG Architecture : 32bit

03/11/2016 15:14:41 root DEBUG Linkage format : WindowsPE

03/11/2016 15:14:41 root DEBUG

03/11/2016 15:14:41 root DEBUG Packages

03/11/2016 15:14:41 root DEBUG Cython : ?

03/11/2016 15:14:41 root DEBUG Numpy : 1.8.1

03/11/2016 15:14:41 root DEBUG Scipy : 0.15.1

03/11/2016 15:14:41 root DEBUG OSGEO : 1.10.1

03/11/2016 15:14:41 root DEBUG Shapely : 1.5.5

03/11/2016 15:14:41 root DEBUG InVEST : 3.2.0

03/11/2016 15:14:41 root DEBUG

03/11/2016 15:14:41 root DEBUG

03/11/2016 15:14:41 root DEBUG Exception not environment-related

03/11/2016 15:14:41 root DEBUG Printing traceback

Traceback (most recent call last):

File "invest_natcap\iui\executor.pyc", line 555, in runModel

File "invest_natcap\scenario_generator\scenario_generator.pyc", line 707, in execute

File "ntpath.pyc", line 199, in splitext

File "genericpath.pyc", line 91, in _splitext

AttributeError: 'int' object has no attribute 'rfind'

None


03/11/2016 15:14:41 root ERROR Exiting due to failures


Post edited by Angelo on

Comments

  • jdouglassjdouglass Administrator, NatCap Staff
    Hi @Angelo,  Sorry about the delay!  Is this still a blocker for you?  If so, could you dropbox your input data to jdouglass@stanford.edu so I can take a look?

    Thanks,
    James
  • Hi James,
    I have already solved the problem (a minor change in factors table) and finished the scenarios.
    Thank you anyway,
    Angelo
     
This discussion has been closed.