Recreation model value error

Hello,

I’m trying to run the InVEST recreation model. Unfortunately, I cant run due to the value error.
Here, my windows,

Could someone kindly help me?

Thanks

Hey @000212,

Thanks for posting to the NatCap forums. @dave will probably be the best person to help you with this one.

Cheers,

Doug

Hi @000212, it would be helpful if you upload the logfile generated from this run. It’s the txt file in your output workspace.

In the meantime, the model is having a hard time opening your road.shp. Are you able to open that file normally in GIS? What happens if move your data to a location that has not spaces in any of the folder names? Also, it’s a good idea to make sure no other GIS program has the data open while you run the model.

Thanks,

Hi Dave,

Thanks for your respond,

Yes, I will be able to open the road.shp in GIS. I also tried to save the data in the folder names with out spaces, but it’s not work for me.

Here, my output from workspace

2020-04-15 10:55:19,931 utils.prepare_workspace(115) INFO Writing log messages to F:/InVEST/InVEST Recreation/InVESTRecreation\InVEST-Recreation-Model-log-2020-04-15–10_55_19.txt

2020-04-15 10:55:19,931 model._logged_target(1642) Level 100 Starting model with parameters:

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

aoi_path F:/InVEST/InVEST Recreation/AOI_RZWP3K/rzwp3k_tourism_zone.shp

cell_size 30

compute_regression True

end_year 2017

grid_aoi True

grid_type hexagon

n_workers -1

predictor_table_path F:/InVEST/InVEST Recreation/predictor_table_road-.csv

results_suffix

scenario_predictor_table_path

start_year 2005

workspace_dir F:/InVEST/InVEST Recreation/InVESTRecreation

2020-04-15 10:55:19,962 model._logged_target(1648) ERROR Exception while executing <function execute at 0x22EACDB0>

Traceback (most recent call last):

File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target

File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 273, in execute

File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 1489, in _validate_same_projection

ValueError: (’%s did not load’, ‘c:/users/rizky/onedrive - world resources institute/project/waves/data/ntt/road.shp’)

2020-04-15 10:55:19,962 model._logged_target(1651) INFO Execution finished

2020-04-15 10:55:19,962 utils.prepare_workspace(121) INFO Elapsed time: 0.03s

Thank in advance helping me,

Hi Dave,

Thanks for your respond,

Yes, I will be able to open the road.shp in GIS. I also tried to save the data in the folder names with out spaces, but it’s not work for me.

Here, my output from workspace

2020-04-15 10:55:19,931 utils.prepare_workspace(115) INFO Writing log messages to F:/InVEST/InVEST Recreation/InVESTRecreation\InVEST-Recreation-Model-log-2020-04-15–10_55_19.txt

2020-04-15 10:55:19,931 model._logged_target(1642) Level 100 Starting model with parameters:

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

aoi_path F:/InVEST/InVEST Recreation/AOI_RZWP3K/rzwp3k_tourism_zone.shp

cell_size 30

compute_regression True

end_year 2017

grid_aoi True

grid_type hexagon

n_workers -1

predictor_table_path F:/InVEST/InVEST Recreation/predictor_table_road-.csv

results_suffix

scenario_predictor_table_path

start_year 2005

workspace_dir F:/InVEST/InVEST Recreation/InVESTRecreation

2020-04-15 10:55:19,962 model._logged_target(1648) ERROR Exception while executing <function execute at 0x22EACDB0>

Traceback (most recent call last):

File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target

File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 273, in execute

File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 1489, in _validate_same_projection

ValueError: (’%s did not load’, ‘c:/users/rizky/onedrive - world resources institute/project/waves/data/ntt/road.shp’)

2020-04-15 10:55:19,962 model._logged_target(1651) INFO Execution finished

2020-04-15 10:55:19,962 utils.prepare_workspace(121) INFO Elapsed time: 0.03s

Thank in advance helping me,

D

Hi Dave,

Thanks for your respond,

Yes, I will be able to open the road.shp in GIS. I also tried to save the data in the folder names with out spaces, but it’s not work for me.

Here, my output from workspace

2020-04-15 10:55:19,931 utils.prepare_workspace(115) INFO Writing log messages to F:/InVEST/InVEST Recreation/InVESTRecreation\InVEST-Recreation-Model-log-2020-04-15–10_55_19.txt

2020-04-15 10:55:19,931 model._logged_target(1642) Level 100 Starting model with parameters:

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

aoi_path F:/InVEST/InVEST Recreation/AOI_RZWP3K/rzwp3k_tourism_zone.shp

cell_size 30

compute_regression True

end_year 2017

grid_aoi True

grid_type hexagon

n_workers -1

predictor_table_path F:/InVEST/InVEST Recreation/predictor_table_road-.csv

results_suffix

scenario_predictor_table_path

start_year 2005

workspace_dir F:/InVEST/InVEST Recreation/InVESTRecreation

2020-04-15 10:55:19,962 model._logged_target(1648) ERROR Exception while executing <function execute at 0x22EACDB0>

Traceback (most recent call last):

File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target

File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 273, in execute

File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 1489, in _validate_same_projection

ValueError: (’%s did not load’, ‘c:/users/rizky/onedrive - world resources institute/project/waves/data/ntt/road.shp’)

2020-04-15 10:55:19,962 model._logged_target(1651) INFO Execution finished

2020-04-15 10:55:19,962 utils.prepare_workspace(121) INFO Elapsed time: 0.03s

Thank in advance helping me,

Hi Dave,

Thanks for your respond,

Yes, I will be able to open the road.shp in GIS. I also tried to save the data in the folder names without spaces, but it’s not work for me.

Here, my output from workspace

2020-04-15 10:55:19,931 utils.prepare_workspace(115) INFO Writing log messages to F:/InVEST/InVEST Recreation/InVESTRecreation\InVEST-Recreation-Model-log-2020-04-15–10_55_19.txt

2020-04-15 10:55:19,931 model._logged_target(1642) Level 100 Starting model with parameters:

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

aoi_path F:/InVEST/InVEST Recreation/AOI_RZWP3K/rzwp3k_tourism_zone.shp

cell_size 30

compute_regression True

end_year 2017

grid_aoi True

grid_type hexagon

n_workers -1

predictor_table_path F:/InVEST/InVEST Recreation/predictor_table_road-.csv

results_suffix

scenario_predictor_table_path

start_year 2005

workspace_dir F:/InVEST/InVEST Recreation/InVESTRecreation

2020-04-15 10:55:19,962 model._logged_target(1648) ERROR Exception while executing <function execute at 0x22EACDB0>

Traceback (most recent call last):

File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target

File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 273, in execute

File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 1489, in _validate_same_projection

ValueError: (’%s did not load’, ‘c:/users/rizky/onedrive - world resources institute/project/waves/data/ntt/road.shp’)

2020-04-15 10:55:19,962 model._logged_target(1651) INFO Execution finished

2020-04-15 10:55:19,962 utils.prepare_workspace(121) INFO Elapsed time: 0.03s

Thank in advance helping me,

Okay, thanks for this info. The problem could also be in the predictor table csv, if the path to road.shp is specified incorrectly in that table. If you would like, you may upload - in an attachment - your CSV file and the road.shp. If you upload the shapefile, please zip all of its parts first. Thanks again,

Hi Dave!

I have a same problem here. The model said ‘Memory error’.
This is the log:
2020-07-08 14:36:28,559 utils.prepare_workspace(115) INFO Writing log messages to D:/01.Master of GIS/00.Course/4th semester/GEOM7400/@DATA ANALYSIS/@Recreation/Workspace_test\InVEST-Recreation-Model-log-2020-07-08–14_36_28.txt
2020-07-08 14:36:28,565 model._logged_target(1642) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.recreation.recmodel_client 3.8.0:
aoi_path D:/01.Master of GIS/00.Course/4th semester/GEOM7400/@DATA ANALYSIS/InVEST/sample_data/recreation/andros_aoi.shp
cell_size 50
compute_regression False
end_year 2017
grid_aoi True
grid_type square
n_workers -1
results_suffix
start_year 2012
workspace_dir D:/01.Master of GIS/00.Course/4th semester/GEOM7400/@DATA ANALYSIS/@Recreation/Workspace_test

2020-07-08 14:36:31,210 recmodel_client._grid_vector(545) INFO gridding aoi
2020-07-08 15:23:03,000 recmodel_client._retrieve_photo_user_days(457) INFO Contacting server, please wait.
2020-07-08 15:23:03,575 recmodel_client._retrieve_photo_user_days(460) INFO Server online, version: 3.7.0.post141+hc694373c56a9.d20190708:./recserver_cache_py36/76e890d2cf86640e_fast_hash.pickle
2020-07-08 15:23:03,791 recmodel_client._retrieve_photo_user_days(468) INFO Server supports year queries between 2005 and 2017
2020-07-08 15:23:03,795 recmodel_client._retrieve_photo_user_days(487) INFO archiving D:/01.Master of GIS/00.Course/4th semester/GEOM7400/@DATA ANALYSIS/@Recreation/Workspace_test\intermediate\aoi.prj
2020-07-08 15:23:03,798 recmodel_client._retrieve_photo_user_days(487) INFO archiving D:/01.Master of GIS/00.Course/4th semester/GEOM7400/@DATA ANALYSIS/@Recreation/Workspace_test\intermediate\aoi.shp
2020-07-08 15:23:58,045 recmodel_client._retrieve_photo_user_days(487) INFO archiving D:/01.Master of GIS/00.Course/4th semester/GEOM7400/@DATA ANALYSIS/@Recreation/Workspace_test\intermediate\aoi.shx
2020-07-08 15:23:58,439 recmodel_client._retrieve_photo_user_days(487) INFO archiving D:/01.Master of GIS/00.Course/4th semester/GEOM7400/@DATA ANALYSIS/@Recreation/Workspace_test\intermediate\aoi.dbf
2020-07-08 15:27:27,356 recmodel_client._retrieve_photo_user_days(495) INFO Please wait for server to calculate PUD…
2020-07-08 15:27:27,395 Task.add_task(641) ERROR Something went wrong when adding task photo-user-day-calculation (1), terminating taskgraph.
Traceback (most recent call last):
File “site-packages\taskgraph\Task.py”, line 607, in add_task
File “site-packages\taskgraph\Task.py”, line 1071, in _call
File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 500, in _retrieve_photo_user_days
File “site-packages\Pyro4\core.py”, line 185, in call
File “site-packages\Pyro4\core.py”, line 437, in _pyroInvoke
File “site-packages\Pyro4\util.py”, line 176, in serializeCall
File “site-packages\Pyro4\util.py”, line 538, in dumpsCall
MemoryError
2020-07-08 15:27:28,946 model._logged_target(1648) ERROR Exception while executing <function execute at 0x0E219D20>
Traceback (most recent call last):
File “site-packages\natcap\invest\ui\model.py”, line 1645, in _logged_target
File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 355, in execute
File “site-packages\taskgraph\Task.py”, line 607, in add_task
File “site-packages\taskgraph\Task.py”, line 1071, in _call
File “site-packages\natcap\invest\recreation\recmodel_client.py”, line 500, in _retrieve_photo_user_days
File “site-packages\Pyro4\core.py”, line 185, in call
File “site-packages\Pyro4\core.py”, line 437, in _pyroInvoke
File “site-packages\Pyro4\util.py”, line 176, in serializeCall
File “site-packages\Pyro4\util.py”, line 538, in dumpsCall
MemoryError
2020-07-08 15:27:28,974 model._logged_target(1651) INFO Execution finished
2020-07-08 15:27:52,774 utils.prepare_workspace(121) INFO Elapsed time: 51m 23.920000000000073s

Could you please help me?
I do not check the regression.

Best regards

Thanks for posting. I restarted the server because it was using more memory than I would expect.

I also strongly suggest to increase your cell size (currently set to 50 meters). There is almost no where in the world with dense enough photo data to be meaningful at such a high resolution. I would start with a very large cell size (thousands of meters), look at the results, and then decrease it incrementally as-needed. The model will run much faster that way too.

1 Like

Dear Dave,

The problem has been solved. Thank you so much for your help.

I would like to ask you one more thing. In Nutrient loads guide I found that the biophysical table is different from InVEST folder’s sample data (biophysical_table_gura). Which one should I follow?

Regards

Hi @Estty -

The biophysical table that is in the sample data has fields for several of the InVEST freshwater models, not only NDR. It should contain load_p, eff_p and crit_len_p, all of which are required for the NDR model (only for phosphorus, there are no entries for nitrogen.) The other fields in biophysical_table_gura.csv are for SDR and Annual Water Yield.

~ Stacie

This topic is closed because it contains conversation about several unrelated issues. If you would like to continue any of these conversations, please start a new topic.

2 Likes