Electricitymap-contrib: Nicaragua is intermittently down

Created on 30 Aug 2019  路  4Comments  路  Source: tmrowco/electricitymap-contrib

There seems to be big gaps in availability of the data, with the following error happening often.

Traceback (most recent call last):
  File "/home/feeder/lib/fetch_data.py", line 172, in launch_parsers
    objs = res.get(timeout)
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
  File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/home/feeder/lib/fetch_data.py", line 170, in <lambda>
    **parser_kwargs))
  File "/home/contrib/parsers/NI.py", line 208, in fetch_production
    production, data_datetime = get_production_from_summary(requests_obj)
  File "/home/contrib/parsers/NI.py", line 157, in get_production_from_summary
    datetime_arrow = arrow.get(d + ' ' + hour, 'DD/MM/YYYY HH')
  File "/usr/local/lib/python3.6/site-packages/arrow/api.py", line 23, in get
    return _factory.get(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/arrow/factory.py", line 198, in get
    dt = parser.DateTimeParser(locale).parse(args[0], args[1])
  File "/usr/local/lib/python3.6/site-packages/arrow/parser.py", line 159, in parse
    raise ParserError('Failed to match \'{0}\' when parsing \'{1}\''.format(final_fmt_pattern, string))
arrow.parser.ParserError: Failed to match '(?P<DD>\d{2})/(?P<MM>\d{2})/(?P<YYYY>\d{4}) (?P<HH>\d{2})' when parsing '

I snipped off the end of the error message which just shows the html. From the looks of it the map url is still ok.

@jarek any thoughts?

bug 馃悶

Most helpful comment

There is also the following data source on the same website which differentiates more production types: http://www.cndc.org.ni/graficos/CurvaDemanda/index.php

Currently I understand few of them, but if we manage to make sense of this data it would be probably worth switching, wouldn't it? I also found a possibility to fetch the chart for historical dates.

All 4 comments

There is also the following data source on the same website which differentiates more production types: http://www.cndc.org.ni/graficos/CurvaDemanda/index.php

Currently I understand few of them, but if we manage to make sense of this data it would be probably worth switching, wouldn't it? I also found a possibility to fetch the chart for historical dates.

@scriptator Good catch! If we manage to find the respective production type for the power plants behind each abbreviation, this would be great!
Many plants and their fuel type are within the NI.py parser already. If the total output per type of the pie chart matches the output of all power plants, we can switch to the more detailed source.

Let's try mapping the abbreviations at http://www.cndc.org.ni/graficos/CurvaDemanda/index.php

I do note though that the values on the pie and bar charts aren't lining up exactly.

ABR
AMY1 - wind?
AMY2 - wind?
EOL - Eolico (Wind)
PBP
PSL
PCF1
PCF2
HPA1
TPC
PMN
EEC
PCG7 - likely thermal
PMT1
PMT3
CEN
PNI1
PNI2
PEN4
PEN3
MER
DESVIO

I fixed the current parser yesterday. Looks like only the URL changed.

Let's try mapping the abbreviations at http://www.cndc.org.ni/graficos/CurvaDemanda/index.php

If sombody wants to work on the mapping and try the other URL which I posted above, I guess we can reopen this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

corradio picture corradio  路  4Comments

corradio picture corradio  路  5Comments

corradio picture corradio  路  4Comments

alixunderplatz picture alixunderplatz  路  4Comments

systemcatch picture systemcatch  路  3Comments