Giter Site home page Giter Site logo

Unexpected exception about spook HOT 4 CLOSED

frenck avatar frenck commented on August 15, 2024
Unexpected exception

from spook.

Comments (4)

emufan avatar emufan commented on August 15, 2024

I can add for same "unknown_entity_references"-check-part of startup

Logger: custom_components.spook
Source: custom_components/spook/repairs/lovelace_unknown_entity_references.py:200
Integration: Spook ([documentation](https://github.com/frenck/spook), [issues](https://github.com/frenck/spook/issues))
First occurred: 08:32:37 (12 occurrences)
Last logged: 08:45:02

Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff8f11e3b0>
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 154, in __async_extract_entities
    entities.update(self.__async_extract_entities_from_badge(badge))
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 200, in __async_extract_entities_from_badge
    return set(config["entities"])
TypeError: unhashable type: 'dict'

from spook.

frenck avatar frenck commented on August 15, 2024

Thanks for reporting those!

I've prepared a small change to make Spook more resilient against unexpected configuration formats.

../Frenck

from spook.

emufan avatar emufan commented on August 15, 2024

@frenck This one is closed now but I still get these error. Should I open a new one?

2023-06-01 18:59:52.372 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_entity_references
2023-06-01 18:59:52.385 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_device_references
2023-06-01 18:59:53.172 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_area_references
2023-06-01 18:59:53.177 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: switch_as_x_unknown_source
2023-06-01 18:59:53.184 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_entity_references
2023-06-01 18:59:54.844 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: integration_unknown_source
2023-06-01 18:59:54.850 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: lovelace_unknown_entity_references
2023-06-01 18:59:54.853 DEBUG (MainThread) [custom_components.spook] Config for dashboard lovelace not found, skipping
2023-06-01 18:59:54.853 ERROR (MainThread) [custom_components.spook] Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff8ec57eb0>
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 230, in __async_extract_entities_from_card
self.__async_extract_entities_from_header_footer(header_footer),
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 308, in __async_extract_entities_from_header_footer
entities.update(self.__async_extract_entities_from_actions(config))
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 254, in __async_extract_entities_from_actions
if action := config.get(key):
AttributeError: 'str' object has no attribute 'get'
2023-06-01 18:59:54.861 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: group_unknown_members
2023-06-01 18:59:54.865 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_device_references
2023-06-01 18:59:54.868 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_area_references
2023-06-01 19:00:02.382 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_entity_references
2023-06-01 19:00:03.200 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_entity_references
2023-06-01 19:00:04.862 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: lovelace_unknown_entity_references
2023-06-01 19:00:04.865 DEBUG (MainThread) [custom_components.spook] Config for dashboard lovelace not found, skipping
2023-06-01 19:00:04.866 ERROR (MainThread) [custom_components.spook] Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff8ec57eb0>
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 230, in __async_extract_entities_from_card
self.__async_extract_entities_from_header_footer(header_footer),
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 308, in __async_extract_entities_from_header_footer
entities.update(self.__async_extract_entities_from_actions(config))
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 254, in __async_extract_entities_from_actions
if action := config.get(key):
AttributeError: 'str' object has no attribute 'get'
2023-06-01 19:00:29.030 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_entity_references
2023-06-01 19:00:29.034 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_entity_references
2023-06-01 19:00:29.039 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: lovelace_unknown_entity_references
2023-06-01 19:00:29.042 DEBUG (MainThread) [custom_components.spook] Config for dashboard lovelace not found, skipping
2023-06-01 19:00:29.042 ERROR (MainThread) [custom_components.spook] Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff8ec57eb0>
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 230, in __async_extract_entities_from_card
self.__async_extract_entities_from_header_footer(header_footer),
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 308, in __async_extract_entities_from_header_footer
entities.update(self.__async_extract_entities_from_actions(config))
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 254, in __async_extract_entities_from_actions
if action := config.get(key):
AttributeError: 'str' object has no attribute 'get'
2023-06-01 19:01:10.959 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_entity_references
2023-06-01 19:01:10.970 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_entity_references
2023-06-01 19:01:10.981 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: lovelace_unknown_entity_references
2023-06-01 19:01:10.990 DEBUG (MainThread) [custom_components.spook] Config for dashboard lovelace not found, skipping
2023-06-01 19:01:10.991 ERROR (MainThread) [custom_components.spook] Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff8ec57eb0>
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 230, in __async_extract_entities_from_card
self.__async_extract_entities_from_header_footer(header_footer),
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 308, in __async_extract_entities_from_header_footer
entities.update(self.__async_extract_entities_from_actions(config))
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 254, in __async_extract_entities_from_actions
if action := config.get(key):
AttributeError: 'str' object has no attribute 'get'
2023-06-01 19:02:35.815 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_entity_references
2023-06-01 19:02:35.818 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_entity_references
2023-06-01 19:02:35.823 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: lovelace_unknown_entity_references
2023-06-01 19:02:35.826 DEBUG (MainThread) [custom_components.spook] Config for dashboard lovelace not found, skipping
2023-06-01 19:02:35.827 ERROR (MainThread) [custom_components.spook] Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff8ec57eb0>
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 230, in __async_extract_entities_from_card
self.__async_extract_entities_from_header_footer(header_footer),
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 308, in __async_extract_entities_from_header_footer
entities.update(self.__async_extract_entities_from_actions(config))
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 254, in __async_extract_entities_from_actions
if action := config.get(key):
AttributeError: 'str' object has no attribute 'get'
2023-06-01 19:03:59.036 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_entity_references
2023-06-01 19:03:59.040 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_entity_references
2023-06-01 19:03:59.045 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: lovelace_unknown_entity_references
2023-06-01 19:03:59.048 DEBUG (MainThread) [custom_components.spook] Config for dashboard lovelace not found, skipping
2023-06-01 19:03:59.048 ERROR (MainThread) [custom_components.spook] Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff8ec57eb0>
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 230, in __async_extract_entities_from_card
self.__async_extract_entities_from_header_footer(header_footer),
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 308, in __async_extract_entities_from_header_footer
entities.update(self.__async_extract_entities_from_actions(config))
File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 254, in __async_extract_entities_from_actions
if action := config.get(key):
AttributeError: 'str' object has no attribute 'get'

from spook.

frenck avatar frenck commented on August 15, 2024

@emufan yes, as this is closed... and you have a new one... new issue = new issue :)

from spook.

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.