# Error when running the examples on macOS

**URL:** <https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261>\
**Category:** Software Support\
**Tags:** seasonal-water-yield\
**Created:** [November 13, 2023, 8:45pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261 "2023-11-13T20:45:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanderleidebastiani](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vanderleidebastiani](https://community.naturalcapitalalliance.org/u/vanderleidebastiani)\
**Post date:** [November 13, 2023, 8:45pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/1 "2023-11-13T20:45:58Z")

</div>

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

I am trying to run inVEST with example data in the Mac. Some models (see below) work fine. However, the model of “Annual Water Yield” and “Sediment Delivery Rate” return errors. Apparently, both errors are in the same step (“build shapely polygon list”).

- InVEST 3.14.0
- Macbook Intel-based (i5)
- macOS Monterey (12.7)

Would anyone have any suggestions as to what could be happening?

Thanks in advance. Vanderlei

### What have you tried so far?

The carbon storage model using example data runs without any problem, but the carbon model doesn’t seem to have this step.

### Attach the logfile here:

2023-11-13 17:11:25,781 (natcap.invest.utils) utils.prepare\_workspace(161) Level 100 Writing log messages to […/inVEST\_TESTES/DroughtRegulation/InVEST-natcap.invest.annual\_water\_yield-log-2023-11-13–17\_11\_25.txt]  
2023-11-13 17:11:25,782 ( **main** ) cli.main(459) Level 100 Starting model with parameters:  
Arguments for InVEST natcap.invest.annual\_water\_yield 3.14.0:  
biophysical\_table\_path …/inVEST/Annual\_Water\_Yield/biophysical\_table\_gura.csv  
demand\_table\_path  
depth\_to\_root\_rest\_layer\_path …/inVEST/Annual\_Water\_Yield/depth\_to\_root\_restricting\_layer\_gura.tif  
eto\_path …/inVEST/Annual\_Water\_Yield/reference\_ET\_gura.tif  
lulc\_path …/inVEST/Annual\_Water\_Yield/land\_use\_gura.tif  
n\_workers -1  
pawc\_path …/inVEST/Annual\_Water\_Yield/plant\_available\_water\_fraction\_gura.tif  
precipitation\_path …/inVEST/Annual\_Water\_Yield/precipitation\_gura.tif  
results\_suffix gura  
seasonality\_constant 5  
sub\_watersheds\_path  
valuation\_table\_path  
watersheds\_path …/inVEST/Annual\_Water\_Yield/watershed\_gura.shp  
workspace\_dir …/inVEST\_TESTES/DroughtRegulation

2023-11-13 17:11:25,979 (pygeoprocessing.geoprocessing) geoprocessing.align\_and\_resize\_raster\_stack(996) INFO 1 of 5 aligned: eto\_gura.tif  
2023-11-13 17:11:26,122 (pygeoprocessing.geoprocessing) geoprocessing.align\_and\_resize\_raster\_stack(996) INFO 2 of 5 aligned: precip\_gura.tif  
2023-11-13 17:11:26,174 (pygeoprocessing.geoprocessing) geoprocessing.align\_and\_resize\_raster\_stack(996) INFO 3 of 5 aligned: depth\_to\_root\_rest\_layer\_gura.tif  
2023-11-13 17:11:26,271 (pygeoprocessing.geoprocessing) geoprocessing.align\_and\_resize\_raster\_stack(996) INFO 4 of 5 aligned: pawc\_gura.tif  
2023-11-13 17:11:26,416 (pygeoprocessing.geoprocessing) geoprocessing.align\_and\_resize\_raster\_stack(996) INFO 5 of 5 aligned: clipped\_lulc\_gura.tif  
2023-11-13 17:11:26,416 (pygeoprocessing.geoprocessing) geoprocessing.align\_and\_resize\_raster\_stack(1000) INFO aligned all 5 rasters.  
2023-11-13 17:11:26,445 (natcap.invest.annual\_water\_yield) annual\_water\_yield.execute(695) INFO Reclassifying temp\_Kc raster  
2023-11-13 17:11:26,455 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(470) INFO starting stats\_worker  
2023-11-13 17:11:26,455 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(476) INFO started stats\_worker \<Thread(Thread-1 (stats\_worker), started daemon 123145601925120)\>  
2023-11-13 17:11:26,519 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(555) INFO 100.0% complete  
2023-11-13 17:11:26,520 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(558) INFO Waiting for raster stats worker result.  
2023-11-13 17:11:26,557 (natcap.invest.annual\_water\_yield) annual\_water\_yield.execute(707) INFO Reclassifying tmp\_root raster  
2023-11-13 17:11:26,570 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(470) INFO starting stats\_worker  
2023-11-13 17:11:26,571 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(476) INFO started stats\_worker \<Thread(Thread-2 (stats\_worker), started daemon 123145601925120)\>  
2023-11-13 17:11:26,625 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(555) INFO 100.0% complete  
2023-11-13 17:11:26,625 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(558) INFO Waiting for raster stats worker result.  
2023-11-13 17:11:26,665 (natcap.invest.annual\_water\_yield) annual\_water\_yield.execute(721) INFO Reclassifying tmp\_veg raster  
2023-11-13 17:11:26,674 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(470) INFO starting stats\_worker  
2023-11-13 17:11:26,675 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(476) INFO started stats\_worker \<Thread(Thread-3 (stats\_worker), started daemon 123145601925120)\>  
2023-11-13 17:11:26,731 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(555) INFO 100.0% complete  
2023-11-13 17:11:26,732 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(558) INFO Waiting for raster stats worker result.  
2023-11-13 17:11:26,774 (natcap.invest.annual\_water\_yield) annual\_water\_yield.execute(734) INFO Calculate PET from Ref Evap times Kc  
2023-11-13 17:11:26,792 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(470) INFO starting stats\_worker  
2023-11-13 17:11:26,792 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(476) INFO started stats\_worker \<Thread(Thread-4 (stats\_worker), started daemon 123145601925120)\>  
2023-11-13 17:11:26,862 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(555) INFO 100.0% complete  
2023-11-13 17:11:26,863 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(558) INFO Waiting for raster stats worker result.  
2023-11-13 17:11:26,928 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(470) INFO starting stats\_worker  
2023-11-13 17:11:26,929 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(476) INFO started stats\_worker \<Thread(Thread-5 (stats\_worker), started daemon 123145601925120)\>  
2023-11-13 17:11:27,106 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(555) INFO 100.0% complete  
2023-11-13 17:11:27,106 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(558) INFO Waiting for raster stats worker result.  
2023-11-13 17:11:27,174 (natcap.invest.annual\_water\_yield) annual\_water\_yield.execute(765) INFO Performing wyield operation  
2023-11-13 17:11:27,186 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(470) INFO starting stats\_worker  
2023-11-13 17:11:27,186 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(476) INFO started stats\_worker \<Thread(Thread-6 (stats\_worker), started daemon 123145601925120)\>  
2023-11-13 17:11:27,262 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(555) INFO 100.0% complete  
2023-11-13 17:11:27,263 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(558) INFO Waiting for raster stats worker result.  
2023-11-13 17:11:27,341 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(470) INFO starting stats\_worker  
2023-11-13 17:11:27,342 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(476) INFO started stats\_worker \<Thread(Thread-7 (stats\_worker), started daemon 123145601925120)\>  
2023-11-13 17:11:27,401 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(555) INFO 100.0% complete  
2023-11-13 17:11:27,402 (pygeoprocessing.geoprocessing) geoprocessing.raster\_calculator(558) INFO Waiting for raster stats worker result.  
2023-11-13 17:11:27,585 (pygeoprocessing.geoprocessing) geoprocessing.align\_and\_resize\_raster\_stack(996) INFO 1 of 1 aligned: clipped\_raster.tif  
2023-11-13 17:11:27,585 (pygeoprocessing.geoprocessing) geoprocessing.align\_and\_resize\_raster\_stack(1000) INFO aligned all 1 rasters.  
2023-11-13 17:11:27,586 (pygeoprocessing.geoprocessing) geoprocessing.zonal\_statistics(1524) INFO build a lookup of aggregate field value to FID  
2023-11-13 17:11:27,586 (pygeoprocessing.geoprocessing) geoprocessing.zonal\_statistics(1531) INFO creating disjoint polygon set  
2023-11-13 17:11:27,586 (pygeoprocessing.geoprocessing) geoprocessing.calculate\_disjoint\_polygon\_set(2554) INFO build shapely polygon list

---

<div class="post-metadata">

**Author:** ![swolny](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/swolny/32/181_2.png) [@swolny](https://community.naturalcapitalalliance.org/u/swolny)\
**Post date:** [November 14, 2023, 4:24am UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/2 "2023-11-14T04:24:50Z")

</div>

Hello @vanderleidebastiani and welcome to the forum!

It doesn’t look like the entire log file was posted. Either that, or the model had not finished running yet. The best thing to do is upload the log file as an attachment, so the whole thing is included.

If you’re concerned about the last line that you posted (“INFO build shapely polygon list”), that is not an error, it is just providing information about which calculation the model is doing. Hopefully the model finished successfully after that.

~ Stacie

---

<div class="post-metadata">

**Author:** ![vanderleidebastiani](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vanderleidebastiani](https://community.naturalcapitalalliance.org/u/vanderleidebastiani)\
**Post date:** [November 14, 2023, 12:16pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/3 "2023-11-14T12:16:05Z")

</div>

Hi @swolny,

It is the entire log available at the moment. The InVEST stop in this step and show me the error (I uploaded a print screen). I waited about 20 minutes without progress.

I downloaded the exact same example and tested it on Windows 11 (in fact the Windows was installed in a virtual machine using the Parallels on the same Mac). The same example finished in 1m 19s

 ![Screen Shot 2023-11-14 at 08.58.55](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/c/c19407ebf84b4dc49687f0db01256caf29c880f3.jpeg)

[InVEST-natcap.invest.annual\_water\_yield-log-2023-11-14–08\_37\_09.txt](https://community.naturalcapitalalliance.org/uploads/short-url/gkDCRph51RQ6ubMrpu5CspPsx6j.txt) (7.5 KB)

Best, Vanderlei

---

<div class="post-metadata">

**Author:** ![swolny](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/swolny/32/181_2.png) [@swolny](https://community.naturalcapitalalliance.org/u/swolny)\
**Post date:** [November 15, 2023, 4:44pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/4 "2023-11-15T16:44:03Z")

</div>

Interesting that it’s behaving differently on Mac vs Windows. I don’t have an explanation for that, so will punt to the software team - @jdouglass perhaps?

~ Stacie

---

<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 15, 2023, 7:02pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/5 "2023-11-15T19:02:17Z")

</div>

@vanderleidebastiani , could you do us a favor and send us yet another logfile?

If you go to the Workbench’s `About > Report a Problem` page, there will be a button to “Find my logs”. Those files may have more info about what went wrong here. Please attach them here if you can. Thank you,

---

<div class="post-metadata">

**Author:** ![vanderleidebastiani](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vanderleidebastiani](https://community.naturalcapitalalliance.org/u/vanderleidebastiani)\
**Post date:** [November 16, 2023, 4:30pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/6 "2023-11-16T16:30:52Z")

</div>

@dave I found this button, but it doesn’t open anything. Could you tell me where I can find these logfiles manually?

Best, Vanderlei

---

<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 16, 2023, 6:17pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/7 "2023-11-16T18:17:50Z")

</div>

@vanderleidebastiani , oh, that’s a problem. The logs should be here:

`/Users/<your username>/Library/Application Support/invest-workbench/logs/`

---

<div class="post-metadata">

**Author:** ![vanderleidebastiani](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vanderleidebastiani](https://community.naturalcapitalalliance.org/u/vanderleidebastiani)\
**Post date:** [November 16, 2023, 7:29pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/8 "2023-11-16T19:29:33Z")

</div>

@dave I only found the invest-workbench folder, but not a logs folder. However, I found some logfiles attached (.zip).

IndexedDB, Local Storage and Session Storage  
[Archive.zip](https://community.naturalcapitalalliance.org/uploads/short-url/4IcQXhFyxJcmEpUVr0yHlWgxtcC.zip) (21.8 KB)

Best, Vanderlei

---

<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 16, 2023, 8:35pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/9 "2023-11-16T20:35:06Z")

</div>

@vanderleidebastiani , my apologies, I steered you in the wrong direction. The MacOS logs should actually be at,

`~/Library/Logs/invest-workbench/`

---

<div class="post-metadata">

**Author:** ![vanderleidebastiani](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vanderleidebastiani](https://community.naturalcapitalalliance.org/u/vanderleidebastiani)\
**Post date:** [November 16, 2023, 9:28pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/10 "2023-11-16T21:28:53Z")

</div>

@dave No problem.

[main.log.txt](https://community.naturalcapitalalliance.org/uploads/short-url/iURnnzOq2lowPtiAPih79tkG3ko.txt) (355.3 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:** [November 17, 2023, 4:45pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/11 "2023-11-17T16:45:35Z")

</div>

Thanks again, @vanderleidebastiani ,

It’s not obvious what is going wrong here, but we think it’s likely a very hard crash that is causing the model to exit without any errors from Python in the model’s log. Probably this is happening during a Shapely operation, as you suggested. We have a development build of InVEST that includes an updated version of Shapely. Could you try installing this and see what happens? [https://github.com/natcap/invest/suites/18285780100/artifacts/1057380920](https://github.com/natcap/invest/suites/18285780100/artifacts/1057380920)

If the problem persists, it seems likely due to conflicting installations of GEOS - a C library used by Shapely. That could happen if you have installed other libraries on your system that also include GEOS (via homebrew, etc). But if you’re not in the habit of doing things like that, I would ignore this idea for now.

Please let us know if that development build works or not. (Also the “Find my Logs” button should be fixed in that version.)

Thanks,

---

<div class="post-metadata">

**Author:** ![vanderleidebastiani](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vanderleidebastiani](https://community.naturalcapitalalliance.org/u/vanderleidebastiani)\
**Post date:** [December 4, 2023, 5:35pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/12 "2023-12-04T17:35:55Z")

</div>

Hi @dave

Sorry for the late reply. The link does not open, page is not found. I tried installing via source files, but I don’t have much knowledge of installing this way (I had installed via the standard way, by clicking). In fact, I won’t need this model soon, so I could wait for the next update and be ready when it comes out (Any prevision?).

If you give me the correct link I can try installing again.

Thanks for your patience. Best, Vanderlei

---

<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:** [December 4, 2023, 6:12pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/13 "2023-12-04T18:12:01Z")

</div>

Sorry about that link!

Here’s a new one: [https://storage.googleapis.com/releases.naturalcapitalproject.org/invest/3.14.0.post155+g49990e06d/workbench/invest\_3.14.0.post155+g49990e06d\_workbench\_darwin\_x64.dmg](https://storage.googleapis.com/releases.naturalcapitalproject.org/invest/3.14.0.post155+g49990e06d/workbench/invest_3.14.0.post155+g49990e06d_workbench_darwin_x64.dmg)

We appreciate you trying it since we’re not able to reproduce the problem on any of our hardware.

---

<div class="post-metadata">

**Author:** ![vanderleidebastiani](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vanderleidebastiani](https://community.naturalcapitalalliance.org/u/vanderleidebastiani)\
**Post date:** [December 4, 2023, 7:01pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/14 "2023-12-04T19:01:55Z")

</div>

Hi @dave

This version works fine! I have run the models “Annual Water Yield” and “Sediment Delivery Rate” with example data and now this is finished without any problem. I just installed the version from the link, and made no other changes to the computer (macOS, or GEOS).

Thanks so much. Best, Vanderlei

---

<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:** [December 11, 2023, 7:01pm UTC](https://community.naturalcapitalalliance.org/t/error-when-running-the-examples-on-macos/4261/15 "2023-12-11T19:01:56Z")

</div>

Closed on December 11, 2023, 7:01pm UTC

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