Error in visitation and recreation running

Hello I got an error message when run visitation and recreation. The message is shown below (log file is attached):

"05/27/2025 00:53:54 taskgraph.Task ERROR Something went wrong when adding task photo-user-day-calculation (1), terminating taskgraph.
Traceback (most recent call last):
File “Pyro4\core.py”, line 511, in connect_and_handshake

Anyone have any idea to fix this problem. I run this model for province in Thailand
InVEST-natcap.invest.recreation.recmodel_client-log-2025-05-27–00_53_50.txt (3.8 KB)

File “Pyro4\socketutil.py”, line 307, in createSocket
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\recreation\recmodel_client.py”, line 612, in _retrieve_photo_user_days
File “Pyro4\core.py”, line 275, in getattr
File “Pyro4\core.py”, line 615, in _pyroGetMetadata
File “Pyro4\core.py”, line 596, in __pyroCreateConnection
File “Pyro4\core.py”, line 549, in connect_and_handshake
Pyro4.errors.CommunicationError: cannot connect to (‘34.44.144.58’, 54321): [WinError 10061] No connection could be made because the target machine actively refused it
05/27/2025 00:53:54 natcap.invest.utils ERROR Exception while executing natcap.invest.recreation.recmodel_client
Traceback (most recent call last):
File “Pyro4\core.py”, line 511, in connect_and_handshake
File “Pyro4\socketutil.py”, line 307, in createSocket
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “invest\cli.py”, line 470, in main
File “natcap\invest\recreation\recmodel_client.py”, line 494, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\recreation\recmodel_client.py”, line 612, in _retrieve_photo_user_days
File “Pyro4\core.py”, line 275, in getattr
File “Pyro4\core.py”, line 615, in _pyroGetMetadata
File “Pyro4\core.py”, line 596, in __pyroCreateConnection
File “Pyro4\core.py”, line 549, in connect_and_handshake
Pyro4.errors.CommunicationError: cannot connect to (‘34.44.144.58’, 54321): [WinError 10061] No connection could be made because the target machine actively refused it
05/27/2025 00:53:54 natcap.invest.utils INFO Elapsed time: 4.39s
05/27/2025 00:53:54 natcap.invest.utils INFO Execution finished

How to fix this kind of error? Thank in advance.

Hi @satha13 , thank you for reporting this error. The best thing to do if you can is update to the latest version of invest: InVEST Downloads, User Guides, and Data Sources | The Natural Capital Project

There were significant updates to the recreation model recently:

  • Added a database of geotagged tweets to support calculating twitter-user-days (TUD) as proxy for visitation rates. The model now calculates photo-user-days (PUD) and TUD and uses their average as the response variable in the regression model. Please refer to the User’s Guide for more details on the regression model.
  • Output data were updated to support the new TUD results, and vector outputs are now in GeoPackage format instead of ESRI Shapefile.
  • Regression coefficients are still listed in a summary text file, and are now also included in a tabular output: “regression_coefficients.csv”.

Hi @dave Thank you for your advise. I have updated to the latest version (3.15.1) and recreation model has worked smoothly.