frenck / spook

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

Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0x7f81b5b04ca0> #217

Closed C0rish closed 9 months ago

C0rish commented 11 months ago

Logger: custom_components.spook Source: custom_components/spook/repairs/lovelace_unknown_entity_references.py:264 Integration: Spook (documentation, issues) First occurred: 13:53:04 (1 occurrences) Last logged: 13:53:04

Unexpected exception from <function AbstractSpookRepair.async_activate.._async_inspect at 0x7f81b5b04ca0> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 117, in _handle_timer_finish await task File "/config/custom_components/spook/repairs/init.py", line 130, in _async_inspect await self.async_inspect() File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 108, in async_inspect for entity_id in self.async_extract_entities(config) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 159, in async_extract_entities entities.update(self.async_extract_entities_from_card(card)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 225, in async_extract_entities_from_card entities.update(self.async_extract_entities_from_card(card)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 225, in async_extract_entities_from_card entities.update(self.async_extract_entities_from_card(card)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 213, in async_extract_entities_from_card entities.update(self.async_extract_entities_from_actions(config)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 255, in async_extract_entities_from_actions entities.update(self.async_extract_entities_from_action(action)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 264, in async_extract_entities_from_action (target := config.get(key)) AttributeError: 'str' object has no attribute 'get'

C0rish commented 11 months ago

I'm using HA 2023.5.4 with the latest spook version: v0.13.131314

C0rish commented 11 months ago

It's definitely not a one time error, it occurs regularly:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.spook Source: custom_components/spook/repairs/lovelace_unknown_entity_references.py:264 Integration: Spook (documentation, issues) First occurred: 6. Juni 2023 um 13:53:04 (66 occurrences) Last logged: 08:14:31

Unexpected exception from <function AbstractSpookRepair.async_activate.._async_inspect at 0x7f81b5b04ca0> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 117, in _handle_timer_finish await task File "/config/custom_components/spook/repairs/init.py", line 130, in _async_inspect await self.async_inspect() File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 108, in async_inspect for entity_id in self.async_extract_entities(config) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 159, in async_extract_entities entities.update(self.async_extract_entities_from_card(card)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 225, in async_extract_entities_from_card entities.update(self.async_extract_entities_from_card(card)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 225, in async_extract_entities_from_card entities.update(self.async_extract_entities_from_card(card)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 213, in async_extract_entities_from_card entities.update(self.async_extract_entities_from_actions(config)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 255, in async_extract_entities_from_actions entities.update(self.async_extract_entities_from_action(action)) File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 264, in async_extract_entities_from_action (target := config.get(key)) AttributeError: 'str' object has no attribute 'get'

pplucky commented 11 months ago

Similar thing happens with v0.14.0 on HA 2023.6.1...

Logger: custom_components.spook
Source: custom_components/spook/repairs/lovelace_unknown_entity_references.py:217 
Integration: Spook ([documentation](https://github.com/frenck/spook), [issues](https://github.com/frenck/spook/issues)) 
First occurred: 14:54:38 (22 occurrences) 
Last logged: 15:23:49

Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0x7f4f82ede0>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 117, in _handle_timer_finish
    await task
  File "/config/custom_components/spook/repairs/__init__.py", line 130, in _async_inspect
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 108, in async_inspect
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 156, in __async_extract_entities
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 215, in __async_extract_entities_from_card
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 218, in __async_extract_entities_from_card
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 217, in __async_extract_entities_from_card
TypeError: 'NoneType' object is not iterable
C0rish commented 11 months ago

My specific error hasn't occurred for a day after updating to Spook 14 and HA 2023.6.1.

I'll keep watching

frenck commented 9 months ago

Is this still gone in V1.0.0+ of this integration?

../Frenck

C0rish commented 9 months ago

Haven't seen this error since you fixed it. Also not with version 1.0.0 or above.

frenck commented 9 months ago

Alright, in that case I'll go ahead and close this one up.

If you come across it again, please let me know 👍

../Frenck