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

ERROR in the script of InVEST recreation model 3.4.4

Hi, I'm currently trying to use the last version of the recreation model from InVEST (3.4.4). It is maybe possible that there is an error in the script because when I run older versions of the model I have no errors. I copy the script with the ERROR, it seems to me that there is some problem with the re-projection step.

Initializing...

Showing messages with level INFO and higher

07/31/2018 11:55:11 natcap.invest.utils INFO Writing log messages to D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\Prueba_recre_invest\InVEST-Recreation-Model-log-2018-07-31--11_55_10.txt

07/31/2018 11:55:11 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

07/31/2018 11:55:11 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

07/31/2018 11:55:11 natcap.invest.ui.model Level 100 Starting model with parameters:

Arguments for InVEST natcap.invest.recreation.recmodel_client 3.4.4:

aoi_path D:/Users/albertonk91/Desktop/UAM master/LIFE_FER/natura_merge_rec.shp

cell_size 1000

compute_regression False

end_year 2017

grid_aoi True

grid_type square

results_suffix

start_year 2010

workspace_dir D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\Prueba_recre_invest


07/31/2018 11:55:11 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

07/31/2018 11:55:11 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

07/31/2018 11:55:11 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

07/31/2018 11:55:11 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

07/31/2018 11:55:11 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

07/31/2018 11:55:11 natcap.invest.recmodel_client INFO Contacting server, please wait.

07/31/2018 11:55:12 natcap.invest.recmodel_client INFO Server online, version: 3.3.2:./recserver_cache_2017/76e890d2cf86640e_fast_hash.pickle

07/31/2018 11:55:12 natcap.invest.recmodel_client INFO Server supports year queries between 2005 and 2017

07/31/2018 11:55:12 natcap.invest.recmodel_client INFO gridding aoi


It would be interesting for me to solve this problem because the latest versions only allow to use the 2014 as the last year.


Thanks in advanced


Alberto

Comments

  • DaveDave Member, Administrator, NatCap Staff
    Hi Alberto,

    That particular error should not actually be preventing your model from completing. Do you have results in your output workspace? If the model is not completing, can you post the entire log file?

  • 08/01/2018 12:12:11  natcap.invest.utils INFO     Writing log messages to D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\Pru_recre_invest_3_4_4\InVEST-Recreation-Model-log-2018-08-01--12_12_11.txt
    08/01/2018 12:12:11  natcap.invest.ui.model Level 100 Starting model with parameters: 
    Arguments for InVEST natcap.invest.recreation.recmodel_client 3.4.4:
    aoi_path           D:/Users/albertonk91/Desktop/UAM master/LIFE_FER/natura_merge_rec.shp
    cell_size          1000
    compute_regression False
    end_year           2017
    grid_aoi           True
    grid_type          square
    results_suffix     
    start_year         2010
    workspace_dir      D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\Pru_recre_invest_3_4_4

    08/01/2018 12:12:11  natcap.invest.recmodel_client INFO     Contacting server, please wait.
    08/01/2018 12:12:12  natcap.invest.recmodel_client INFO     Server online, version: 3.3.2:./recserver_cache_2017/76e890d2cf86640e_fast_hash.pickle
    08/01/2018 12:12:12  natcap.invest.recmodel_client INFO     Server supports year queries between 2005 and 2017
    08/01/2018 12:12:12  natcap.invest.recmodel_client INFO     gridding aoi
    08/01/2018 12:13:47  natcap.invest.recmodel_client INFO     archiving D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\Pru_recre_invest_3_4_4\aoi.prj
    08/01/2018 12:13:47  natcap.invest.recmodel_client INFO     archiving D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\Pru_recre_invest_3_4_4\aoi.shp
    08/01/2018 12:13:47  natcap.invest.recmodel_client INFO     archiving D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\Pru_recre_invest_3_4_4\aoi.shx
    08/01/2018 12:13:47  natcap.invest.recmodel_client INFO     archiving D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\Pru_recre_invest_3_4_4\aoi.dbf
    08/01/2018 12:13:47  natcap.invest.recmodel_client INFO     Please wait for server to calculate PUD...

Sign In or Register to comment.