tesselo / tesselate

Tesselo's Python SDK
MIT License
0 stars 0 forks source link

Occasional bug in regional statistics #7

Open mflaxman10 opened 5 years ago

mflaxman10 commented 5 years ago

Don't always get this, and don't understand exact conditions when I do.

Most recently: Generating value counts for formula ARIA - Soil Moisture - Positive Range 100 in region Brazil - SC - Otacilio Costa - Forest for July 2017 composite


TypeError Traceback (most recent call last)

in 7 # The regional aggregate function takes a list of value count results and 8 # returns the regional statistics. ----> 9 regional_aggregate = ts.regional_aggregate(aggregates) 10 print(regional_aggregate) ~/.local/lib/python3.5/site-packages/tesselate/tesselate.py in regional_aggregate(self, valuecounts) 77 78 def regional_aggregate(self, valuecounts): ---> 79 return regional_aggregate(valuecounts) 80 81 def z_scores_grouping(self, mean, std): ~/.local/lib/python3.5/site-packages/tesselate/aggregation.py in regional_aggregate(valuecounts) 45 """ 46 # Compute sum of sums. ---> 47 stats_t0 = sum([dat['pcount'] for dat in valuecounts]) 48 stats_t1 = sum([dat['psum'] for dat in valuecounts]) 49 stats_t2 = sum([dat['psumsq'] for dat in valuecounts]) TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
mflaxman10 commented 5 years ago

Seems to be transient - rerunning now same as above and without bug. Running with asynch turned on