[2024-03-20 16:12:19,477: ERROR/ForkPoolWorker-17] Metric evaluation failed
Traceback (most recent call last):
File "/Users/cmackenz/git/zenodo-rdm/site/zenodo_rdm/metrics/utils.py", line 29, in calculate_metrics
metric["value"] = metric["value"]()
File "/Users/cmackenz/git/zenodo-rdm/site/zenodo_rdm/metrics/api.py", line 107, in get_uptime
for d in res.json()["monitors"]
KeyError: 'monitors'
The key is not found as when run locally the API returns:
Close https://github.com/zenodo/ops/issues/392
Error:
The key is not found as when run locally the API returns:
Also
datetime.utcnow()
is deprecated so I have exchanged it for the correct implementation https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow