# Pollination value error

**URL:** <https://community.naturalcapitalalliance.org/t/pollination-value-error/3663>\
**Category:** Software Support\
**Tags:** pollination\
**Created:** [April 22, 2023, 5:30pm UTC](https://community.naturalcapitalalliance.org/t/pollination-value-error/3663 "2023-04-22T17:30:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aludzuweit](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@aludzuweit](https://community.naturalcapitalalliance.org/u/aludzuweit)\
**Post date:** [April 22, 2023, 5:30pm UTC](https://community.naturalcapitalalliance.org/t/pollination-value-error/3663/1 "2023-04-22T17:30:25Z")

</div>

I am encountering exactly the same ERROR as described in a previous post 2169

I checked my shape file for any rows not populated - the file is complete and contains the 3 seasons spring, summer and autumn for all rows.  
I checked for typos in the shape file, the biophysical CSV table and the guild CSV table but could not find any.

1. Headers in biophysical table  
lucode lu\_descript nesting\_cavity\_availability\_index nesting\_ground\_availability\_index floral\_resources\_spring\_index floral\_resources\_summer\_index floral\_resources\_autumn\_index
2. Headers in guild table  
SPECIES nesting\_suitability\_cavity\_index nesting\_suitability\_ground\_index foraging\_activity\_spring\_index foraging\_activity\_summer\_index foraging\_activity\_autumn\_index alpha relative\_abundance
3. Headers in attribute table of farm shape file:  
fid DN crop\_type half\_sat p\_managed season fr\_spring fr\_summer fr\_autumn n\_cavity n\_ground p\_dep

I re-populated the season column several times using the CASE function in QGIS and re-ran the pollination model several times. However, I keep getting the same error message.

CASE  
WHEN “DN” = 1 THEN ‘Spring’  
When “DN” = 2 THEN ‘Summer’  
WHEN “DN” = 3 THEN ‘Summer’  
WHEN “DN” = 4 THEN ‘Summer’  
WHEN “DN” = 5 THEN ‘Autumn’  
WHEN “DN” = 6 THEN ‘Autumn’  
WHEN “DN” = 7 THEN ‘Autumn’  
WHEN “DN” = 8 THEN ‘Autumn’  
WHEN “DN” = 9 THEN ‘Summer’  
WHEN “DN” = 10 THEN ‘Summer’  
WHEN “DN” = 11 THEN ‘Summer’  
WHEN “DN” = 12 THEN ‘Summer’  
WHEN “DN” \> 12 THEN ‘Spring’  
END

Can you help?

Attached the latest log file and biophysical CSV. I can provide the shape file via a public link if helpful.

[Pollinator25.csv](https://community.naturalcapitalalliance.org/uploads/short-url/mAhkX3wL6LhbofvVptf3BvU51sb.csv) (552 Bytes)

[InVEST-natcap.invest.pollination-log-2023-04-22–18\_19\_21.txt](https://community.naturalcapitalalliance.org/uploads/short-url/li9iqqHvgxaHWH1WvPaKHYC98WS.txt) (3.0 KB)

---

<div class="post-metadata">

**Author:** ![aludzuweit](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@aludzuweit](https://community.naturalcapitalalliance.org/u/aludzuweit)\
**Post date:** [April 22, 2023, 5:33pm UTC](https://community.naturalcapitalalliance.org/t/pollination-value-error/3663/2 "2023-04-22T17:33:18Z")

</div>

Here is the link to the previous post with the same error message: [Pollination: ValueError encountered](https://community.naturalcapitalalliance.org/t/pollination-valueerror-encountered/2169)

---

<div class="post-metadata">

**Author:** ![aludzuweit](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@aludzuweit](https://community.naturalcapitalalliance.org/u/aludzuweit)\
**Post date:** [April 22, 2023, 5:35pm UTC](https://community.naturalcapitalalliance.org/t/pollination-value-error/3663/3 "2023-04-22T17:35:43Z")

</div>

Here is the public link to the farm shape file: [WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free](https://we.tl/t-CqmDflouOg)

---

<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:** [April 24, 2023, 2:52pm UTC](https://community.naturalcapitalalliance.org/t/pollination-value-error/3663/4 "2023-04-24T14:52:31Z")

</div>

Hi @aludzuweit -

Thanks for detailing all of the things you tried to fix this. I’m wondering if it’s actually a problem with capitalization.

[As the User Guide says](https://storage.googleapis.com/releases.naturalcapitalproject.org/invest-userguide/latest/en/croppollination.html#data-needs), " The _SEASON_ name must exactly match a season given in the Guild Table."

The error message says:  
ValueError: Found seasons in farm polygon that were not specified in the biophysical table: {‘Autumn’, ‘Spring’, ‘Summer’}. Expected only these: defaultdict(\<class ‘dict’\>, {‘spring’: {‘guild’: ‘foraging\_activity\_spring\_index’, ‘farm’: ‘fr\_spring’, ‘biophysical’: ‘floral\_resources\_spring\_index’}, ‘summer’: {‘guild’: ‘foraging\_activity\_summer\_index’, ‘farm’: ‘fr\_summer’, ‘biophysical’: ‘floral\_resources\_summer\_index’}, ‘autumn’: {‘guild’: ‘foraging\_activity\_autumn\_index’, ‘farm’: ‘fr\_autumn’, ‘biophysical’: ‘floral\_resources\_autumn\_index’}})

The difference between the two is that “Autumn” etc are capitalized in the farm polygon, but are not capitalized in the biophysical table. Can you check to see if this is the issue?

~ Stacie

---

<div class="post-metadata">

**Author:** ![aludzuweit](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@aludzuweit](https://community.naturalcapitalalliance.org/u/aludzuweit)\
**Post date:** [April 24, 2023, 8:50pm UTC](https://community.naturalcapitalalliance.org/t/pollination-value-error/3663/5 "2023-04-24T20:50:26Z")

</div>

Thank you @swolny! Changing season names from capital to small letters in the farm polygon has indeed solved the issue. The model ran through fine and without errors. 🙂

---

<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:** [July 23, 2023, 8:50pm UTC](https://community.naturalcapitalalliance.org/t/pollination-value-error/3663/6 "2023-07-23T20:50:46Z")

</div>

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