Code Monkey home page Code Monkey logo

Comments (18)

Hellowlol avatar Hellowlol commented on September 27, 2024 1

@Lrputola please reload the integration and see if it still works. The issue was in related and willbe closed

from nordpool.

Hellowlol avatar Hellowlol commented on September 27, 2024

Tried reloading the integration? Mine still works

from nordpool.

luu5 avatar luu5 commented on September 27, 2024

Mine worked fine until midnight, since then no updates until manual reset at 4 pm.

from nordpool.

Hellowlol avatar Hellowlol commented on September 27, 2024

Ok, well nothing usefull in the issue to debug the problem. Please provide the required info

from nordpool.

luu5 avatar luu5 commented on September 27, 2024

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.

ejansson88 avatar ejansson88 commented on September 27, 2024

from nordpool.

Hellowlol avatar Hellowlol commented on September 27, 2024

Enable debug logging grab the url that was used to parse the data.

from nordpool.

sazern avatar sazern commented on September 27, 2024

same here stopped working yesterday it seems.

from nordpool.

Hellowlol avatar Hellowlol commented on September 27, 2024

@sazern what region?

from nordpool.

sazern avatar sazern commented on September 27, 2024

@sazern what region?

SE3

I reloaded it and now it seems to work again

from nordpool.

quenthal avatar quenthal commented on September 27, 2024

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.

Hellowlol avatar Hellowlol commented on September 27, 2024

@quenthal what zone is this? Seems like there is a null value in the prices

from nordpool.

quenthal avatar quenthal commented on September 27, 2024

@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.

viperhansa avatar viperhansa commented on September 27, 2024

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.

phsdv avatar phsdv commented on September 27, 2024

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.

nikee73 avatar nikee73 commented on September 27, 2024

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.

Lrputola avatar Lrputola commented on September 27, 2024

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.

Lrputola avatar Lrputola commented on September 27, 2024

Thanks, yes. After 3 hours past publishing and multiple restarts it suddenly started to work.

from nordpool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.