# Visitation server: RuntimeError: OGR Error: Corrupt data

**URL:** <https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523>\
**Category:** Software Support\
**Tags:** recreation\
**Created:** [October 20, 2026, 7:48pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523 "2026-10-20T19:48:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isabella\_Smith](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@Isabella\_Smith](https://community.naturalcapitalalliance.org/u/Isabella_Smith)\
**Post date:** [October 20, 2026, 7:48pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/1 "2026-10-20T19:48:22Z")

</div>

#### Hi,

I am trying to run the visitation model to get results from a map, but I keep encountering these errors, and I’m not sure why. I’m including a file folder that includes all the data input, the log text, and other files that resulted from it. Let me know if there’s anything you might need!

Thanks!

[invest\_recreation\_datastack.tgz](https://community.naturalcapitalalliance.org/uploads/short-url/rphq8Ta4uj3V55loKWLp9MgzOq.tgz) (3.3 KB)

---

<div class="post-metadata">

**Author:** ![jdouglass](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/jdouglass/32/9_2.png) [@jdouglass](https://community.naturalcapitalalliance.org/u/jdouglass)\
**Post date:** [October 21, 2026, 4:54pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/2 "2026-10-21T16:54:14Z")

</div>

Hello @Isabella_Smith and welcome back! Could you also provide the logfile from your model run? That will help us determine whether the issue is in the data, on the server, or somewhere in between.

---

<div class="post-metadata">

**Author:** ![Isabella\_Smith](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@Isabella\_Smith](https://community.naturalcapitalalliance.org/u/Isabella_Smith)\
**Post date:** [October 22, 2026, 12:16am UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/3 "2026-10-22T00:16:44Z")

</div>

Hi,

Yes, I’m attaching it here!

[InVEST-coastal\_blue\_carbon-log-2026-10-20–15\_55\_09.txt](https://community.naturalcapitalalliance.org/uploads/short-url/l8qVp2gh0BAYJiHFdUEb4s5mjuj.txt) (48.6 KB)

---

<div class="post-metadata">

**Author:** ![jdouglass](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/jdouglass/32/9_2.png) [@jdouglass](https://community.naturalcapitalalliance.org/u/jdouglass)\
**Post date:** [October 22, 2026, 7:40pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/4 "2026-10-22T19:40:05Z")

</div>

It looks like this logfile is from a Coastal Blue Carbon model run, which won’t match the Recreation model issue that you mentioned. Could you try uploading the Recreation logfile?

Thanks!

---

<div class="post-metadata">

**Author:** ![Isabella\_Smith](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@Isabella\_Smith](https://community.naturalcapitalalliance.org/u/Isabella_Smith)\
**Post date:** [October 22, 2026, 7:58pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/5 "2026-10-22T19:58:44Z")

</div>

Oh sorry! I accidentally sent the wrong one. Here’s the right one.

[InVEST-recreation-log-2026-10-20–15\_41\_31.txt](https://community.naturalcapitalalliance.org/uploads/short-url/vz60rcv4fI58XjWhdhxjX3rXAri.txt) (7.3 KB)

---

<div class="post-metadata">

**Author:** ![jdouglass](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/jdouglass/32/9_2.png) [@jdouglass](https://community.naturalcapitalalliance.org/u/jdouglass)\
**Post date:** [October 22, 2026, 8:36pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/6 "2026-10-22T20:36:30Z")

</div>

Got it, thanks! This is an interesting error that I don’t think I’ve seen before. I’m looking into it.

---

<div class="post-metadata">

**Author:** ![Isabella\_Smith](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@Isabella\_Smith](https://community.naturalcapitalalliance.org/u/Isabella_Smith)\
**Post date:** [October 22, 2026, 10:21pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/7 "2026-10-22T22:21:56Z")

</div>

Okay, thank you very much for being willing to help!

---

<div class="post-metadata">

**Author:** ![marioontiyuelo](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@marioontiyuelo](https://community.naturalcapitalalliance.org/u/marioontiyuelo)\
**Post date:** [October 23, 2026, 12:56pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/8 "2026-10-23T12:56:40Z")

</div>

Hello @jdouglass,

I am getting what looks like the same error as in this topic. Every Recreation run I tried today (23 Oct 2026, InVEST 3.20.2, Windows) fails on the server right after the AOI upload, both with my own AOI (Illas Atlánticas, Spain) and with the official sample data (andros\_aoi.shp, 2012-2017, no regression), so it does not seem to depend on the input data.

The AOI is accepted and decompressed on the server (PUD and TUD start “running calc user days”), and then both fail with RuntimeError: OGR Error: Corrupt data in recmodel\_server.\_calc\_aggregated\_points\_in\_aoi → pygeoprocessing.transform\_bounding\_box → target\_ref.ImportFromWkt(target\_projection\_wkt). The WKT that fails is the target one (lat\_lng\_ref.ExportToWkt()), not the AOI’s, so the server seems unable to build its WGS84 reference (maybe a missing PROJ database in the invest\_3\_19\_0 environment).

I could not attach the files (new account), so I paste both logs below. The second one is shortened because its traceback is identical to the first.

> **Log with the sample data (andros\_aoi.shp)**
>
> ```auto
> 2026-10-23 12:16:43 natcap.invest.utils Level 100 Writing log messages to [G:\Mi unidad\Islas\InVEST-recreation-log-2026-10-23--12_16_43.txt]
> 2026-10-23 12:16:43 natcap.invest.spec Level 100 Starting model with parameters:
> Arguments for InVEST recreation 3.20.2:
> aoi_path G:\Mi unidad\Islas\EXTERNAL\INVEST\Recreation\recreation\andros_aoi.shp
> compute_regression False
> end_year 2017
> grid_aoi False
> n_workers -1
> results_suffix Text_data_example
> start_year 2012
> workspace_dir G:\Mi unidad\Islas
> 
> 2026-10-23 12:16:44 natcap.invest.recreation.recmodel_client INFO PYRO:natcap.invest.recreation@34.56.65.180:54323
> 2026-10-23 12:16:44 natcap.invest.recreation.recmodel_client INFO Contacting server, please wait.
> 2026-10-23 12:16:45 natcap.invest.recreation.recmodel_client INFO flickr server supports year queries between 2005 and 2017
> 2026-10-23 12:16:45 natcap.invest.recreation.recmodel_client INFO AOI accepted. Fewer than 105563 flickr points found within AOI extent: [-78.80246553844518, 23.303864467695696, -76.90482755985715, 25.620871797981472]
> 2026-10-23 12:16:45 natcap.invest.recreation.recmodel_client INFO twitter server supports year queries between 2012 and 2022
> 2026-10-23 12:16:45 natcap.invest.recreation.recmodel_client INFO AOI accepted. Fewer than 2527427 twitter points found within AOI extent: [-78.80246553844518, 23.303864467695696, -76.90482755985715, 25.620871797981472]
> 2026-10-23 12:16:45 natcap.invest.recreation.recmodel_client INFO archiving G:\Mi unidad\Islas\intermediate\aoi_Text_data_example.gpkg
> 2026-10-23 12:16:45 natcap.invest.recreation.recmodel_client INFO Please wait for server to calculate PUD and TUD...
> 2026-10-23 12:16:52 PUD INFO decompress zip file AOI
> 2026-10-23 12:16:52 PUD INFO running calc user days on /usr/local/recreation-server/invest_3_15_0/server/flickr/local/cae0378b-115c-4589-8d52-d198f7e94d78
> 2026-10-23 12:16:52 TUD INFO decompress zip file AOI
> 2026-10-23 12:16:52 TUD INFO running calc user days on /usr/local/recreation-server/invest_3_15_0/server/twitter/local/ca0f38a0-9ebf-4d9d-b522-3b603e0650f9
> 2026-10-23 12:16:54 natcap.invest.recreation.recmodel_client INFO connection release
> 2026-10-23 12:16:54 natcap.invest.recreation.recmodel_client ERROR concurrent.futures.process._RemoteTraceback:
> """
> Traceback (most recent call last):
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/env/lib/python3.13/concurrent/futures/process.py", line 254, in _process_worker
> r = call_item.fn(*call_item.args, **call_item.kwargs)
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/src/natcap/invest/recreation/recmodel_server.py", line 455, in calc_user_days_in_aoi
> self._calc_aggregated_points_in_aoi(
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> aoi_path, workspace_path, start_year, end_year,
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> target_filename, logger))
> ^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/src/natcap/invest/recreation/recmodel_server.py", line 551, in _calc_aggregated_points_in_aoi
> global_b_box = pygeoprocessing.transform_bounding_box(
> local_b_box, aoi_info['projection_wkt'], lat_lng_ref.ExportToWkt())
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/env/lib/python3.13/site-packages/pygeoprocessing/utils.py", line 32, in wrapper
> return func(*args, **kwargs)
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/env/lib/python3.13/site-packages/pygeoprocessing/geoprocessing.py", line 3652, in transform_bounding_box
> target_ref.ImportFromWkt(target_projection_wkt)
> ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/env/lib/python3.13/site-packages/osgeo/osr.py", line 1703, in ImportFromWkt
> return _osr.SpatialReference_ImportFromWkt(self, *args)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^
> RuntimeError: OGR Error: Corrupt data
> """
> 
> The above exception was the direct cause of the following exception:
> 
> Traceback (most recent call last):
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/src/natcap/invest/recreation/recmodel_server.py", line 205, in calculate_userdays
> results[label] = future.result()
> ~~~~~~~~~~~~~ ^^
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/env/lib/python3.13/concurrent/futures/_base.py", line 449, in result
> return self.__get_result()
> ~~~~~~~~~~~~~~~~~ ^^
> File "/usr/local/recreation-server/invest_3_15_0/invest_3_19_0/env/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
> raise self._exception
> RuntimeError: OGR Error: Corrupt data
> 
> 2026-10-23 12:16:54 taskgraph.Task ERROR Something went wrong when adding task user-day-calculation (1), terminating taskgraph.
> Traceback (most recent call last):
> File "taskgraph\Task.py", line 684, in add_task
> File "taskgraph\Task.py", line 1103, in _call
> File "natcap\invest\recreation\recmodel_client.py", line 800, in _retrieve_user_days
> RuntimeError: An error occurred on the server.
> 2026-10-23 12:16:54 natcap.invest.utils ERROR Exception while executing recreation
> Traceback (most recent call last):
> File "natcap\invest\utils.py", line 169, in prepare_workspace
> File "natcap\invest\spec.py", line 2609, in execute
> File "natcap\invest\recreation\recmodel_client.py", line 563, in execute
> File "taskgraph\Task.py", line 684, in add_task
> File "taskgraph\Task.py", line 1103, in _call
> File "natcap\invest\recreation\recmodel_client.py", line 800, in _retrieve_user_days
> RuntimeError: An error occurred on the server.
> 2026-10-23 12:16:54 natcap.invest.utils INFO Elapsed time: 10.88s
> 2026-10-23 12:16:54 natcap.invest.utils INFO Execution finished; version: 3.20.2
> 
> ```

> **Log with my own AOI (zones\_Atlanticas.geojson), shortened**
>
> ```auto
> 2026-10-23 11:58:24 natcap.invest.spec Level 100 Starting model with parameters:
> Arguments for InVEST recreation 3.20.2:
> aoi_path G:\Mi unidad\Islas\~AUX\AUX08_Atlanticas\zones_Atlanticas.geojson
> compute_regression False
> end_year 2017
> grid_aoi False
> n_workers -1
> results_suffix Test_delete
> start_year 2012
> workspace_dir G:\Mi unidad\Islas
> 
> 2026-10-23 11:58:26 natcap.invest.recreation.recmodel_client INFO AOI accepted. Fewer than 349146 flickr points found within AOI extent: [-9.101601611253699, 41.95367914795743, -8.535256584253185, 42.81081091105713]
> 2026-10-23 11:58:27 natcap.invest.recreation.recmodel_client INFO AOI accepted. Fewer than 5574095 twitter points found within AOI extent: [-9.101601611253699, 41.95367914795743, -8.535256584253185, 42.81081091105713]
> 2026-10-23 11:58:35 PUD INFO running calc user days on /usr/local/recreation-server/invest_3_15_0/server/flickr/local/5a87302d-141d-4e6a-8083-6705778dd6ca
> 2026-10-23 11:58:35 TUD INFO running calc user days on /usr/local/recreation-server/invest_3_15_0/server/twitter/local/309966d0-a267-4270-96ca-ecdae4b587e5
> 2026-10-23 11:58:37 natcap.invest.recreation.recmodel_client ERROR concurrent.futures.process._RemoteTraceback:
> [... identical traceback to the first log: recmodel_server.py line 551 _calc_aggregated_points_in_aoi -> pygeoprocessing.transform_bounding_box -> target_ref.ImportFromWkt(target_projection_wkt) -> RuntimeError: OGR Error: Corrupt data ...]
> RuntimeError: An error occurred on the server.
> 2026-10-23 11:58:37 natcap.invest.utils INFO Elapsed time: 12.91s
> 2026-10-23 11:58:37 natcap.invest.utils INFO Execution finished; version: 3.20.2
> 
> ```

Thanks,  
Mario

---

<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 23, 2026, 1:15pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/9 "2026-10-23T13:15:58Z")

</div>

@Isabella_Smith , @marioontiyuelo , thank you for reporting this issue. It seems like something was corrupted on the server. We have switched over to a new server and things should be working as expected now. Please try again. Thanks!

---

<div class="post-metadata">

**Author:** ![marioontiyuelo](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@marioontiyuelo](https://community.naturalcapitalalliance.org/u/marioontiyuelo)\
**Post date:** [October 23, 2026, 9:47pm UTC](https://community.naturalcapitalalliance.org/t/visitation-server-runtimeerror-ogr-error-corrupt-data/6523/10 "2026-10-23T21:47:08Z")

</div>

Hi @dave, thank you for your quick response. I can confirm the problem is solved: the model now runs correctly with the sample data.  
Hugs!  
Mario
