Pollination: ValueError encountered

Hello NatCap team,

I’m running the Crop Pollination model which works fine without the “farm vector” layer but when I add this layer it doesn’t work anymore. I had several errors about the field names of this layer and I was able to solve most of them but I can’t solve this one (log attached):

Found seasons in farm polygon that were not specified in the biophysical table: {None}. 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’}})

Thank you in advance for your help (and your great work!).

OlivierInVEST-Crop-Pollination-log-2021-09-10–10_44_26.txt (2.9 KB)

Hello @Olivier ,

Thanks for your question about InVEST’s Crop Pollination model.

Check the ‘season’ column in your farm vector’s attribute table and ensure that there are no entries other than the seasons you intended to include (e.g.: ‘spring’, ‘summer’, ‘autumn’). If there are extras, or if any are misspelled, or if there are blank rows, edit the shapefile accordingly. Also, check that your biophysical table contains a corresponding column labeled ‘floral_resources_[SEASON]_index’ for each unique season listed in the farm vector. If it does not, be sure to add any missing columns, labeled exactly as such.

-Jesse

1 Like

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