Closed
Description
parse_prices
tries to access series dict with soup_series.index.freqstr
series = {
'15T': [],
'30T': [],
'60T': []
}
for soup in _extract_timeseries(xml_text):
soup_series = _parse_timeseries_generic(soup, 'price.amount')
series[soup_series.index.freqstr].append(soup_series)
The string gets set to '60min', and not '60T', which results in a KeyError. The index is set in _parse_datetimeindex
:
delta = _resolution_to_timedelta(res_text=soup.find('resolution').text)
index = pd.date_range(start=start, end=end, freq=delta, inclusive='left')
Here's the stacktrace for completeness:
prices = client.query_day_ahead_prices(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "site-packages/entsoe/decorators.py", line 122, in year_wrapper
frame = func(*args, start=_start, end=_end, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "site-packages/entsoe/entsoe.py", line 1186, in query_day_ahead_prices
series = parse_prices(text)[resolution]
^^^^^^^^^^^^^^^^^^
File "site-packages/entsoe/parsers.py", line 38, in parse_prices
series[soup_series.index.freqstr].append(soup_series)
~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '60min'
Metadata
Metadata
Assignees
Labels
No labels
Activity