# Carbon Values error

**URL:** <https://community.naturalcapitalalliance.org/t/carbon-values-error/2203>\
**Category:** Software Support\
**Tags:** carbon\
**Created:** [September 30, 2021, 5:56pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203 "2021-09-30T17:56:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarahhalperin](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sarahhalperin](https://community.naturalcapitalalliance.org/u/sarahhalperin)\
**Post date:** [September 30, 2021, 5:56pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/1 "2021-09-30T17:56:37Z")

</div>

Hi I am running the Carbon Model version 3.9 and receiving an error "values in the LULC raster were found that are not represented under the ‘lucode’ column… the missing values found in the LULC raster but not the table are [-3.4e+38].

However, I have checked the values of the raster and that doesn’t seem to be true. Any help would be amazing! I have attached the raster that seems to be the problem and my Pools data.

[02\_WeightedAverageCpools.csv](https://community.naturalcapitalalliance.org/uploads/short-url/sizNPQVJPxtA6uOLVyFJLWLSu2G.csv) (489 Bytes)

[TV.NLCD\_2001w.tif](https://community.naturalcapitalalliance.org/uploads/short-url/wUwJRch3JOUYDVlSaa3MTzCiR3r.tif) (2.5 MB)

---

<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:** [September 30, 2021, 8:50pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/2 "2021-09-30T20:50:57Z")

</div>

Hi @sarahhalperin ,

Is there any chance that your LULC’s nodata value set to -3.4e+38? If so, I’m pretty sure that we fixed this issue in InVEST 3.9.1. Could you try downloading the latest version of InVEST and re-running the model on your inputs to see if it has indeed been fixed?

Here’s the download page: [InVEST | Natural Capital Project](https://naturalcapitalproject.stanford.edu/software/invest)

Let us know if it’s still an issue!

Thanks,  
James

---

<div class="post-metadata">

**Author:** ![jesseG](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/jesseg/32/1068_2.png) [@jesseG](https://community.naturalcapitalalliance.org/u/jesseG)\
**Post date:** [September 30, 2021, 10:36pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/3 "2021-09-30T22:36:08Z")

</div>

Hi @sarahhalperin ,

I know you from Bren and NCEAS and softball in SB! I hope you’re well.

James is indeed correct that your LULC’s NoData value is set to -3.4e+38. Please do try out InVEST 3.9.1 to see if the model runs with these same inputs that you uploaded here. We’d love to know if this bug has been fixed. If not, I went ahead and changed the LULC’s NoData value to a positive value [9999] using ArcGIS’s Set Null tool. When I used this as the input, the model ran successfully. The file is too large to attach here, but let me know if you want help changing the value yourself or if I you’d like me to email you the updated LULC.

Be well,  
Jesse

---

<div class="post-metadata">

**Author:** ![sarahhalperin](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sarahhalperin](https://community.naturalcapitalalliance.org/u/sarahhalperin)\
**Post date:** [October 1, 2021, 7:04pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/4 "2021-10-01T19:04:39Z")

</div>

Thanks for the speedy response! I have tried downloading inVEST 3.9.1 onto my PC and it downloads successfully; however, when I go to run a model the normal black box opens and then immediately closes. Do you have any idea what could be causing this?

Thanks,

Sarah

---

<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 3, 2021, 11:31pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/5 "2021-10-03T23:31:42Z")

</div>

Oh! Well, that’s not great … when the black cmd window closes that quickly, it means there was an error on startup. So let’s take a look at the error message. To do that, would you please follow the steps below to take a look at the error?

1. Open `cmd.exe`
2. At the command prompt, run the following: `"C:\Program Files\InVEST_3.9.1_x64\invest-3-x64\invest.exe run carbon"`
3. Copy and paste the error text that’s printed to the command prompt here into the thread.

Once we have that error message, we can debug why it isn’t starting up and fix the issue.

Thanks for your help with this!  
James

---

<div class="post-metadata">

**Author:** ![sarahhalperin](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sarahhalperin](https://community.naturalcapitalalliance.org/u/sarahhalperin)\
**Post date:** [October 4, 2021, 2:54pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/6 "2021-10-04T14:54:15Z")

</div>

Hi James,

Please see the image attached. I ran what you suggested, but that seemed to be the incorrect. I modified the path, but that also didn’t seem to work.

Thanks!

Sarah

 ![CarbonModel](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/8/8fceca5f51f470b935d51284874e355b0fe2460b.png)

---

<div class="post-metadata">

**Author:** ![dcdenu4](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dcdenu4/32/544_2.png) [@dcdenu4](https://community.naturalcapitalalliance.org/u/dcdenu4)\
**Post date:** [October 4, 2021, 3:04pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/7 "2021-10-04T15:04:05Z")

</div>

Hi @sarahhalperin ,

Thanks for trying that out and getting back to us. Could you try this instead?:  
`"C:\Program Files\InVEST_3.9.1_x64\invest-3-x64\invest.exe" run carbon`

Not the quotes surround the path to the `exe` application. Let us know!

Doug

---

<div class="post-metadata">

**Author:** ![sarahhalperin](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sarahhalperin](https://community.naturalcapitalalliance.org/u/sarahhalperin)\
**Post date:** [October 4, 2021, 3:31pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/8 "2021-10-04T15:31:16Z")

</div>

Hi Doug,

My apologies! Let see if I did it right his time.

Thanks,

Sarah

 ![CarbonModel](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/8/83534656b340baa710accb5ea567f4dee10a5d0f.png)

---

<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 4, 2021, 3:49pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/9 "2021-10-04T15:49:12Z")

</div>

Oh this is kind of exciting! We just saw a similar error on another computer. In this case, it looks like an environment variable isn’t being expanded. Would you be willing to share the contents of your PATH environment variable with us?

In this case, I suspect we’ll just need to replace %USERPROFILE% with the path to your user folder.

---

<div class="post-metadata">

**Author:** ![sarahhalperin](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sarahhalperin](https://community.naturalcapitalalliance.org/u/sarahhalperin)\
**Post date:** [October 4, 2021, 4:49pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/10 "2021-10-04T16:49:04Z")

</div>

I’ll apologize in advance for my novice knowledge of computers. Is this what you are looking for?

![EnvironmentVariables2](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/f/fb597d92986f955701a078cc6b9eaca2885f5905.png)  
 ![EnvironmentVariables](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/7/725262ef4d36c54ba3f219b1dcb4c680ebd36b7b.png)

---

<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 4, 2021, 5:31pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/11 "2021-10-04T17:31:09Z")

</div>

Perfect, this is exactly the information we’re looking for!

So, to start out with, could you change the `%USERPROFILE%` in the second window to `C:\Users\sarahhalperin` and then try re-running InVEST?

It’s possible we may need to also change some of the other entries in the system environment variables, but the error was coming from the `%USERPROFILE%` one so let’s start there.

---

<div class="post-metadata">

**Author:** ![sarahhalperin](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sarahhalperin](https://community.naturalcapitalalliance.org/u/sarahhalperin)\
**Post date:** [October 4, 2021, 6:19pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/12 "2021-10-04T18:19:22Z")

</div>

Ok, I switched the %USERPROFILE% and now I get the following error.

 ![Error](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/3/353656bf1e6e7dfee2ba51b5498074aaff73c50a.png)

---

<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 4, 2021, 9:01pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/13 "2021-10-04T21:01:49Z")

</div>

Oh! Did you happen to open a new `cmd.exe` prompt after changing the environment variables? I forgot to mention that you’d need to do that in order to use the new variables. I’m sorry about the hassle here!

---

<div class="post-metadata">

**Author:** ![sarahhalperin](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sarahhalperin](https://community.naturalcapitalalliance.org/u/sarahhalperin)\
**Post date:** [October 5, 2021, 3:32pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/14 "2021-10-05T15:32:27Z")

</div>

No problem, I appreciate your help! I think I solved the problem!

I needed to simple set the to user profile to “%USERPROFILE%” not “%USERPROFILE%C:\Users\sarahhalperin”.

---

<div class="post-metadata">

**Author:** ![dcdenu4](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dcdenu4/32/544_2.png) [@dcdenu4](https://community.naturalcapitalalliance.org/u/dcdenu4)\
**Post date:** [October 6, 2021, 4:31pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/15 "2021-10-06T16:31:20Z")

</div>

Hi @sarahhalperin ,

We’re glad you were able to fix your issue. For our own understanding and future debugging, would you mind outlining exactly what you changed, specifying what it was before and what it was after? Any helpful screen shots would be great too! Thanks and no worries if don’t have the time.

Doug

---

<div class="post-metadata">

**Author:** ![sarahhalperin](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sarahhalperin](https://community.naturalcapitalalliance.org/u/sarahhalperin)\
**Post date:** [October 6, 2021, 4:49pm UTC](https://community.naturalcapitalalliance.org/t/carbon-values-error/2203/16 "2021-10-06T16:49:02Z")

</div>

Hi @dcdenu4,

I unfortunately did not save all the screen shots of the errors, but the problem appeared to be with my environmental variable path. Specifically, the "%USERPROFILE%.

Before: "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps  
After: "%USERPROFILE%

Please see the screenshots attached. I hope that is helpful!

Best,

Sarah

![EnvironmentVariables](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/7/725262ef4d36c54ba3f219b1dcb4c680ebd36b7b.png)  
 ![EnvironmentVariablesSwitch](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/b/b7377f9d7430b5120bed66f001c3aa0b3035bf36.png)
