# InVEST Recreation and Tourism model Connection error

**URL:** <https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251>\
**Category:** Software Support\
**Tags:** recreation, python\
**Created:** [October 31, 2025, 3:26am UTC](https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251 "2025-10-31T03:26:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yf11](https://avatars.discourse-cdn.com/v4/letter/y/74df32/32.png) [@yf11](https://community.naturalcapitalalliance.org/u/yf11)\
**Post date:** [October 31, 2025, 3:26am UTC](https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251/1 "2025-10-31T03:26:39Z")

</div>

#### What is the issue or question you have?

Is the connection error caused by my local environment or by the InVEST server?

#### What do you expect to happen?

Successfully connect to the InVEST Recreation model’s remote server or receive guidance on an alternative approach.

#### What have you tried so far?

1. Split the AOI from **ADM0 (Thailand)** to **ADM1 level** because using ADM0 resulted in too many photo points, making the model fail due to size.
2. Attempted to run the Recreation model with the ADM1-level shapefiles using Python.
3. Despite these changes, I still cannot connect to the server.

### Upload the logfile using the 📤 button

[recreation\_batch\_20251031-115826.log](https://community.naturalcapitalalliance.org/uploads/short-url/crPVpcXah3oiPVrsAGsNK3liyJe.log) (510.9 KB)

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [October 31, 2025, 1:29pm UTC](https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251/2 "2025-10-31T13:29:08Z")

</div>

Hi @yf11 , which version of `natcap.invest` are you using? I think I can tell from the traceback that you are attempting to connect to a defunct server, so updating `natcap.invest` should likely do the trick.

Also, the latest version will tell you right away whether your AOI contains too many points or not. So you may wish to try ADM0 again. Though you may still find you need to split it up.

---

<div class="post-metadata">

**Author:** ![yf11](https://avatars.discourse-cdn.com/v4/letter/y/74df32/32.png) [@yf11](https://community.naturalcapitalalliance.org/u/yf11)\
**Post date:** [November 2, 2025, 7:35am UTC](https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251/3 "2025-11-02T07:35:28Z")

</div>

I’m using the natcap.invest (3.17.0).

Of course, I can run the model manually with the split adm1 level, but when I tried to run it through Python, I still encountered the following errors.

Problem 1: Server Connection Failure

- The Natural Capital Project server (`34.44.144.58:54321`) is refusing connections

Problem 2: File Reading Bug

- InVEST’s internal `_copy_aoi_no_grid` function returns `None`

- The same error occurs with both Shapefiles and GeoPackages

- GDAL can read the files correctly, but InVEST’s internal processing fails

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [November 3, 2025, 2:15pm UTC](https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251/4 "2025-11-03T14:15:28Z")

</div>

Hi @yf11 , there a couple things from your original log that indicate an older version of `natcap.invest` was running at that time.

1. The `_retrieve_photo_user_days` function was renamed to `_retrieve_user_days`.
2. `natcap.invest` now requires `Pyro5` instead of `Pyro4`. That could possibly explain the server connection problems.

If you have updated to 3.17.0 and `Pyro5` and you have a new logfile please share it, I am happy to take a closer look.

> [@yf11](#):
>
> InVEST’s internal `_copy_aoi_no_grid` function returns `None`

It looks like this function is designed to return `None`. It should however write a new file to the destination filepath:

```auto
def _copy_aoi_no_grid(source_aoi_path, dest_aoi_path):
    """Copy a shapefile from source to destination."""

```

If you have an updated log with new Traceback, I am happy to take a closer look.

---

<div class="post-metadata">

**Author:** ![jackylu](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jackylu](https://community.naturalcapitalalliance.org/u/jackylu)\
**Post date:** [November 13, 2025, 7:13am UTC](https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251/5 "2025-11-13T07:13:26Z")

</div>

Hello, I also have the same problem with v3.14.0, and I tried the other version such as 3.14.2 & 3.13.0.

However, all these older versions showed errors like this:

11/13/2025 15:10:53 natcap.invest.recreation.recmodel\_client INFO Contacting server, please wait.

11/13/2025 15:10:56 taskgraph.Task ERROR Something went wrong when adding task photo-user-day-calculation (1), terminating taskgraph.

(Here are the first two sentences of errors)

Are these older versions still working? Since I really need to refine my results before, and the newer version changed limit of start year from 2005 to 2012.

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [November 13, 2025, 1:52pm UTC](https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251/6 "2025-11-13T13:52:12Z")

</div>

> [@jackylu](#):
>
> Are these older versions still working? Since I really need to refine my results before, and the newer version changed limit of start year from 2005 to 2012.

Hi @jackylu The older versions are no longer supported, sorry. I’m not sure what your goals are, but if you already have the PUD values you need, you could consider doing the rest of your analysis outside of InVEST. And if you need updated PUD values, I would suggest using the latest version of the model. It does restrict the years, but we generally caution against analyzing individual years anyway, and recommend working with average annual values instead. The new version also includes data from twitter (TUD).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/8/8d95591aa074da87ea0fdd61ca47c1c3c0588aa7.png) [@system](https://community.naturalcapitalalliance.org/u/system)\
**Post date:** [February 11, 2026, 1:52pm UTC](https://community.naturalcapitalalliance.org/t/invest-recreation-and-tourism-model-connection-error/6251/7 "2026-02-11T13:52:38Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
