MTrab / energidataservice

Fetches spot prices from Energi Data Service
GNU General Public License v3.0
181 stars 26 forks source link

Retry attempts exceeded for tariffs request. #381

Closed dkgof closed 1 year ago

dkgof commented 1 year ago

Describe the issue

When trying to fetch the tariffs an internal server error happens at energidataservice.dk that results in the prices for the day being without tariffs until refreshing the integration.

What version of Home Assistant Core has the issue?

core-2023.9.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Diagnostics information

config_entry-energidataservice-076f1644aadf685d9965d8bdfc082dcd.json.txt

Anything in the logs that might be useful for us?

2023-10-03 00:02:16.664 ERROR (MainThread) [custom_components.energidataservice.tariffs.energidataservice] Error during API request: 500, message='Internal Server Error', url=URL('https://api.energidataservice.dk/dataset/DatahubPricelist?filter=%7B%22chargetypecode%22:+%5B%22151-NT01T%22%5D,%22gln_number%22:+%5B%225790000704842%22%5D%7D&sort=ValidFrom+desc&limit=500')
2023-10-03 00:03:26.523 ERROR (MainThread) [custom_components.energidataservice.tariffs.energidataservice] Error during API request: 500, message='Internal Server Error', url=URL('https://api.energidataservice.dk/dataset/DatahubPricelist?filter=%7B%22chargetypecode%22:+%5B%22151-NT01T%22%5D,%22gln_number%22:+%5B%225790000704842%22%5D%7D&sort=ValidFrom+desc&limit=500')
2023-10-03 00:05:46.442 ERROR (MainThread) [custom_components.energidataservice.tariffs.energidataservice] Error during API request: 500, message='Internal Server Error', url=URL('https://api.energidataservice.dk/dataset/DatahubPricelist?filter=%7B%22chargetypecode%22:+%5B%22151-NT01T%22%5D,%22gln_number%22:+%5B%225790000704842%22%5D%7D&sort=ValidFrom+desc&limit=500')
2023-10-03 00:09:16.571 ERROR (MainThread) [custom_components.energidataservice.tariffs.energidataservice] Error during API request: 500, message='Internal Server Error', url=URL('https://api.energidataservice.dk/dataset/DatahubPricelist?filter=%7B%22chargetypecode%22:+%5B%22151-NT01T%22%5D,%22gln_number%22:+%5B%225790000704842%22%5D%7D&sort=ValidFrom+desc&limit=500')
2023-10-03 00:12:47.321 ERROR (MainThread) [custom_components.energidataservice.tariffs.energidataservice] Error during API request: 500, message='Internal Server Error', url=URL('https://api.energidataservice.dk/dataset/DatahubPricelist?filter=%7B%22chargetypecode%22:+%5B%22151-NT01T%22%5D,%22gln_number%22:+%5B%225790000704842%22%5D%7D&sort=ValidFrom+desc&limit=500')
2023-10-03 00:12:47.322 WARNING (MainThread) [async_retrying_ng] ClientResponseError -> Attempts (5) are over for <function Connector.async_call_api at 0x7fb7fc4d6980>
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/async_retrying_ng/__init__.py", line 124, in wrapped
ret = await ret
^^^^^^^^^
File "/config/custom_components/energidataservice/tariffs/energidataservice/__init__.py", line 188, in async_call_api
resp.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('https://api.energidataservice.dk/dataset/DatahubPricelist?filter=%7B%22chargetypecode%22:+%5B%22151-NT01T%22%5D,%22gln_number%22:+%5B%225790000704842%22%5D%7D&sort=ValidFrom+desc&limit=500')
2023-10-03 00:12:47.330 ERROR (MainThread) [custom_components.energidataservice.tariffs.energidataservice] Retry attempts exceeded for tariffs request.

Additional information

No response

MTrab commented 1 year ago

Update to latest version

dkgof commented 1 year ago

Not excactly sure why HACS did not show there was a new version, it does now. But i was sure to check for any new versions inside HACS first. Thanks.