kipe / nordpool

Python library for fetching Nord Pool spot prices.
MIT License
96 stars 37 forks source link

elspot returning `inf` values for price. #28

Closed thijsdev closed 1 year ago

thijsdev commented 1 year ago

Somewhere between yesterday (25-Sept-2022) and today (26-Sept-2022) the prices went to inf. Any idea what happened. Prices on the site are just normal.

prices_spot = elspot.Prices()
hourly_prices = prices_spot.hourly(areas=['EE'])
pprint(hourly_prices)

results in:

{'areas': {'EE': {'Average': inf,
                  'Max': inf,
                  'Min': inf,
                  'Off-peak 1': inf,
                  'Off-peak 2': inf,
                  'Peak': inf,
                  'values': [{'end': datetime.datetime(2022, 9, 26, 23, 0, tzinfo=<UTC>),
                              'start': datetime.datetime(2022, 9, 26, 22, 0, tzinfo=<UTC>),
                              'v
...
thijsdev commented 1 year ago

I see the other comments now. Should wait till after 13:00 CET for prices.

kipe commented 1 year ago

This is completely normal. The script tries to find prices for the next day, and they're not published yet -> defaults to infinite. You should cache the results and only fetch once per day, for example at 13 o'clock UTC, when they should be published.