frenck / spook

A scary 👻 powerful toolbox 🧰 for Home Assistant 🏡
https://spook.boo
MIT License
381 stars 36 forks source link

Attribute error for spook repairs with core 2024.4 #728

Closed thomluther closed 1 week ago

thomluther commented 1 month ago

What version of Spook are you using?

2.2.4

What version of Home Assistant are you using?

2024.4.2

The problem

File "/config/custom_components/spook/repairs.py", line 166, in _filter_event service = event.data.get("service") ^^^^^^^^^^ AttributeError: 'dict' object has no attribute 'data'

Anything in the logs? Paste it here!

Logger: homeassistant.core
Quelle: core.py:1438
Erstmals aufgetreten: 16:55:33 (8 Vorkommnisse)
Zuletzt protokolliert: 16:55:34

Error in event filter
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in _async_fire
    if event_data is None or not event_filter(event_data):
                                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/spook/repairs.py", line 166, in _filter_event
    service = event.data.get("service")
              ^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'data'
frenck commented 2 weeks ago

CleanShot 2024-04-30 at 22 33 54

That line doesn't exist anymore, it seems like you are running an older version than you specified.

Please upgrade to the latest version.

../Frenck

thomluther commented 1 week ago

Indeed it was related to a pretty old version of Spook, which I just found by using the file editor and checking the manifest.json (Not sure if there is another way to see the installed spook version?). Weird thing is that HA never reported that there is an update for Spook integration and I now also failed to 'update' it manually with the update.install service since spook doesn't seem to provide an update entity like other custom components do. I had the HACS experimental features enabled, which also failed to re-install spook for any reason. So I ended up disabling the HACS experimental features again, restarting HA and then re-installing Spook integration via HACS after I deleted all browser cache. Now I don't see any more errors and hope that future spook updates will be presented in HA :-)