Comments (18)
@Lrputola please reload the integration and see if it still works. The issue was in related and willbe closed
from nordpool.
Tried reloading the integration? Mine still works
from nordpool.
Mine worked fine until midnight, since then no updates until manual reset at 4 pm.
from nordpool.
Ok, well nothing usefull in the issue to debug the problem. Please provide the required info
from nordpool.
Only logs I have available, I guess, are here (country FI):
`Traceback (most recent call last):
File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr
self._update()
File "/config/custom_components/nordpool/sensor.py", line 340, in _update
self._average = mean(today)
^^^^^^^^^^^
File "/usr/local/lib/python3.12/statistics.py", line 484, in mean
T, total, n = _sum(data)
^^^^^^^^^^
File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum
for n, d in map(_exact_ratio, values):
File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio
raise TypeError(msg)
TypeError: can't convert type 'NoneType' to numerator/denominator
2024-02-18 15:00:00.090 ERROR (MainThread) [homeassistant.util.logging] Exception in handle_new_hr when dispatching 'nordpool_update_hour': ()
Traceback (most recent call last):
File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio
return (x.numerator, x.denominator)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'numerator'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr
self._update()
File "/config/custom_components/nordpool/sensor.py", line 340, in _update
self._average = mean(today)
^^^^^^^^^^^
File "/usr/local/lib/python3.12/statistics.py", line 484, in mean
T, total, n = _sum(data)
^^^^^^^^^^
File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum
for n, d in map(_exact_ratio, values):
File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio
raise TypeError(msg)
TypeError: can't convert type 'NoneType' to numerator/denominator
2024-02-18 16:00:00.091 ERROR (MainThread) [homeassistant.util.logging] Exception in handle_new_hr when dispatching 'nordpool_update_hour': ()
Traceback (most recent call last):
File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio
return (x.numerator, x.denominator)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'numerator'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr
self._update()
File "/config/custom_components/nordpool/sensor.py", line 340, in _update
self._average = mean(today)
^^^^^^^^^^^
File "/usr/local/lib/python3.12/statistics.py", line 484, in mean
T, total, n = _sum(data)
^^^^^^^^^^
File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum
for n, d in map(_exact_ratio, values):
File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio
raise TypeError(msg)
TypeError: can't convert type 'NoneType' to numerator/denominator`
from nordpool.
from nordpool.
Enable debug logging grab the url that was used to parse the data.
from nordpool.
same here stopped working yesterday it seems.
from nordpool.
@sazern what region?
from nordpool.
@sazern what region?
SE3
I reloaded it and now it seems to work again
from nordpool.
Reloaded. Still not working completely.
Logger: homeassistant.util.logging
Source: util/logging.py:102
First occurred: 00.00.00 (24 occurrences)
Last logged: 20.00.00
Exception in handle_new_day when dispatching 'nordpool_update_day': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 475, in handle_new_day await self.handle_new_hr() File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
Exception in handle_new_hr when dispatching 'nordpool_update_hour': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
Exception in handle_new_price when dispatching 'nordpool_update_new_price': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 506, in handle_new_price await self.handle_new_hr() File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
from nordpool.
@quenthal what zone is this? Seems like there is a null value in the prices
from nordpool.
@quenthal what zone is this? Seems like there is a null value in the prices
FI(nland). This started either today or yesterday.
For quick fix, I made automation to reload the integration. Looking at the attributes, it seems that all values for today and tomorrow are there, but error logs like I copy&pasted keep coming in.
from nordpool.
Same issue on 2 different instances:
Have tried reload and re installed.
No Change.
Sweden, SE3 area.
Logger: homeassistant.util.logging
Source: util/logging.py:102
First occurred: 12:00:00 AM (50 occurrences)
Last logged: 8:32:34 PM
Exception in handle_new_day when dispatching 'nordpool_update_day': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 475, in handle_new_day await self.handle_new_hr() File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
Exception in handle_new_hr when dispatching 'nordpool_update_hour': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
Exception in handle_new_price when dispatching 'nordpool_update_new_price': () Traceback (most recent call last): File "/usr/local/lib/python3.12/statistics.py", line 327, in _exact_ratio return (x.numerator, x.denominator) ^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'numerator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/nordpool/sensor.py", line 506, in handle_new_price await self.handle_new_hr() File "/config/custom_components/nordpool/sensor.py", line 492, in handle_new_hr self._update() File "/config/custom_components/nordpool/sensor.py", line 340, in _update self._average = mean(today) ^^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 484, in mean T, total, n = _sum(data) ^^^^^^^^^^ File "/usr/local/lib/python3.12/statistics.py", line 193, in _sum for n, d in map(_exact_ratio, values): File "/usr/local/lib/python3.12/statistics.py", line 330, in _exact_ratio raise TypeError(msg) TypeError: can't convert type 'NoneType' to numerator/denominator
from nordpool.
I still have the same issue. The old sensor is gone, the device is there but no sensor. I have added new device, making a new sensor with a digit increased by one. But needs manual reloading every day
from nordpool.
After a HA restart this intgration fails to start
Error adding entity sensor.nordpool_kwh for domain sensor with platform nordpool
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 576, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 865, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1327, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/nordpool/sensor.py", line 518, in async_added_to_hass
await self.handle_new_hr()
File "/config/custom_components/nordpool/sensor.py", line 480, in handle_new_hr
today = await self._api.today(self._area, self._currency)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nordpool/init.py", line 110, in today
return await self._someday(area, currency, "today")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nordpool/init.py", line 99, in _someday
await self.update_today(None)
File "/config/custom_components/nordpool/init.py", line 80, in update_today
await self._update("today")
File "/config/custom_components/nordpool/init.py", line 73, in _update
data = await spot.hourly(end_date=dt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nordpool/aio_price.py", line 228, in hourly
return await self.fetch(self.HOURLY, end_date, areas)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nordpool/aio_price.py", line 217, in fetch
res = await asyncio.gather(*jobs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nordpool/aio_price.py", line 174, in _fetch_json
return await self._io(
^^^^^^^^^^^^^^^
File "/config/custom_components/nordpool/aio_price.py", line 160, in _io
resp = await self.client.get(url, params=kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 605, in _request
await resp.start(conn)
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 961, in start
with self._timer:
File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in exit
raise asyncio.TimeoutError from None
TimeoutError
from nordpool.
Seems like Nordpool has changed their API to a new host https://data.nordpoolgroup.com and integration doesn't seem to work anymore. Does any other service work with minimal change to code? Still looking into it, but my Python skills are very much lacking...
from nordpool.
Thanks, yes. After 3 hours past publishing and multiple restarts it suddenly started to work.
from nordpool.
Related Issues (20)
- Add `get_energy_prices` service call
- Q: Additional Cost based on date HOT 3
- VAT configuration seems to not working HOT 4
- A reliable way of triggering automations only when Nordpool price period changes HOT 9
- Negative values to additional_costs HOT 1
- Detected blocking call to open inside the event loop (HA 2024.6) HOT 26
- Not updating, exceptions logged related to new_data_cb(...), handle_new_day and more HOT 17
- Not getting values from Nordpool after latest HA-Update HOT 9
- 'nordpool' calls async_forward_entry_setup for integration HOT 1
- Detected blocking call to open inside the event loop by custom integration 'nordpool' at custom_components/nordpool/aio_price.py HOT 1
- VAT for Finland will increase from 0.24 to 0.255 starting from 1.9.2024 HOT 3
- Detected blocking call event loop again in misc.py
- Integration errors blocking system reboots HOT 3
- Detected blocking calls HOT 1
- Warning Message; To be solved before HA 2025.1 update.
- missing example APEX chart
- Detecting a blocking call HOT 2
- Nordpool takes over 10 seconds to start HOT 1
- 0.0.15b1 not showing tomorrows prices
- 0.0.15.b1 tomorrows prices gone after restart HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nordpool.