Just to keep track of what was fixed:
[ ] fixed Bolivia
[x] fixed Peru
Regarding Bolivia, the logger says:
HTTPConnectionPool(host='www.cndc.bo', port=80): Max retries exceeded with url: /media/archivos/graf/gene_hora/despacho_diario.php?fechag=2020-02-22 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc41f9fe160>: Failed to establish a new connection: [Errno 111] Connection refused',))
Maybe you were blocked by cndc? I tried to run locally but got 403 and couldn't reach the website after a few attempts.
For Peru, it seems like data is returned. But something is wrong with the datetime:
invalid point: {'zoneKey': 'PE', 'dt': datetime.datetime(2020, 2, 22, 1, 0, tzinfo=tzfile('/usr/share/zoneinfo/America/Lima')), 'production': {'biomass': 0.0, 'unknown': 0.0, 'coal': 0.0, 'oil': 0.0, 'wind': 118.56758, 'gas': 2518.37848, 'hydro': 9087.05788, 'solar': 0.0}, 'source': 'coes.org.pe', 'schemaVersion': 3}, reason:datetime was not returned for PE
I guess it's due to tzinfo=tzfile('/usr/share/zoneinfo/America/Lima') ?
Maybe it has to do with the key of the time item. For Peru 'dt' instead of the standard 'datetime' is used.
Maybe it has to do with the key of the time item. For Peru 'dt' instead of the standard 'datetime' is used.
Ahhh that due my find and replace being overly aggressive 馃槃
I will fix this tonight.
Seems like we've been blocked to me because I can fetch the data without problems. I know some Spanish, if you want I'll contact them.
That would be great @GitMatze
I haven't gotten a response so far but the problem seems to be resolved anyway.
Closing as it seems like Bolivia is back. Feel free to correct me if you guys think this should still be open!