Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put the merged dashboard work live #170

Draft
wants to merge 233 commits into
base: live
Choose a base branch
from
Draft

Put the merged dashboard work live #170

wants to merge 233 commits into from

Conversation

Bjwebb
Copy link
Contributor

@Bjwebb Bjwebb commented Dec 11, 2024

This is a combination of the IATI Dashboard, IATI Publishing Stats, and Code for IATI analytics. The plan is to merge this in January, when it will also go live on https://dashboard.iatistandard.org/

Equivalent IATI-Dashboard PR: IATI/IATI-Dashboard#627

Ocre42 and others added 29 commits July 25, 2024 09:49
We saw a crash on live and dev:

  File "/work/IATI-Publishing-Statistics/IATI-Stats/statsrunner/aggregate.py", line 117, in aggregate
    dict_sum_inplace(publisher_total, subtotal)
  File "/work/IATI-Publishing-Statistics/IATI-Stats/statsrunner/aggregate.py", line 29, in dict_sum_inplace
    dict_sum_inplace(d1[k], v)
  File "/work/IATI-Publishing-Statistics/IATI-Stats/statsrunner/aggregate.py", line 37, in dict_sum_inplace
    d1[k] += v
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'

Here is a local test you can run that crashes before this commit and doesn't afterwards:

import statsrunner.aggregate
import types
d1 = { "dogs": 67 }
d2 = { "dogs":None }
statsrunner.aggregate.dict_sum_inplace(d1,d2)

This PR is masking the root error; why is None suddenly coming through?
This however should let processing not crash and carry on
Also, set retry variables specifically rather than rely on defaults.
It's clearer that we want retries and we may tweak them later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants