viktak / ha-cc-abalin-nameday

Home Assistant custom component for the abalin name day API
GNU General Public License v3.0
6 stars 2 forks source link

Error on Device Update #2

Closed LuckyTriple7 closed 2 years ago

LuckyTriple7 commented 2 years ago

Entity is unavailable since yesterday ...

HA 2022.2.9

2022-02-19 15:51:58 ERROR (MainThread) [homeassistant.components.sensor] abalin_nameday: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 718, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/abalin_nameday/sensor.py", line 98, in update
    self.data.update(self.type)
  File "/config/custom_components/abalin_nameday/sensor.py", line 62, in update
    self.data = json.loads(myNameDay.GetData())
  File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 42 (char 41)
nagylukacs commented 2 years ago

Yes, I have the same result :-(

viktak commented 2 years ago

Yes, I also noticed it.

The problem is that the upstream service is offline. Just got a message from the maintainer that it will be up and running again tomorrow. I'm leaving this ticket open in the meantime.

viktak commented 2 years ago

This issue is now resolved, please update this component to the latest version in HACS.

nagylukacs commented 2 years ago

Tökéletes, köszönöm! (Works smoothly, thanks)

KitHubek commented 1 year ago

the same here today:

Logger: homeassistant.components.sensor
Source: custom_components/abalin_nameday/sensor.py:62
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 19:28:42 (1 occurrences)
Last logged: 19:28:42

abalin_nameday: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update
    await task
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/abalin_nameday/sensor.py", line 98, in update
    self.data.update(self.type)
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 192, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/abalin_nameday/sensor.py", line 62, in update
    self.data = json.loads(myNameDay.GetData())
  File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 42 (char 41)