Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Related to spook? #183

Open
emufan opened this issue Jun 1, 2023 · 6 comments
Open

Related to spook? #183

emufan opened this issue Jun 1, 2023 · 6 comments

Comments

@emufan
Copy link

emufan commented Jun 1, 2023

Ofc I don't use spook as is is not allowed or recommended. 😉 But let's assume I would and would find these lines in my log often but now and then directly after I would have installed it:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
    return await target
TypeError: object NoneType can't be used in 'await' expression

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
    log_exception(format_err, *args)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
    friendly_msg = format_err(*args)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
    target.__name__,
AttributeError: 'NoneType' object has no attribute '__name__'

Would it be possible that it is related to spook?

@frenck
Copy link
Owner

frenck commented Jun 1, 2023

I can't say, as it doesn't reflect any of that from the shared information/logs.

../Frenck

@emufan
Copy link
Author

emufan commented Jun 1, 2023

I can't either. But this are the only messages several times in my log. It is starting after enabling and installing the integration and stopping directly after disabling the integration.

I would share more, if I would see anything more.

@emufan
Copy link
Author

emufan commented Jun 1, 2023

Here some more debug flow after updateing and reanabling Spook

2023-06-01 18:58:50.950 DEBUG (MainThread) [custom_components.spook] Spook service manager initialized
2023-06-01 18:58:50.950 DEBUG (MainThread) [custom_components.spook] Setting up Spook services
2023-06-01 18:58:50.989 DEBUG (MainThread) [custom_components.spook] Unregistering service that will be overriden service: input_number.increment
2023-06-01 18:58:50.989 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: input_number.increment
2023-06-01 18:58:50.990 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: input_number.increment
2023-06-01 18:58:50.992 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.disable_entity
2023-06-01 18:58:50.992 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.disable_entity
2023-06-01 18:58:50.994 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.delete_area
2023-06-01 18:58:50.995 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.delete_area
2023-06-01 18:58:50.997 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.disable_device
2023-06-01 18:58:50.997 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.disable_device
2023-06-01 18:58:50.999 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.remove_alias_from_area
2023-06-01 18:58:51.000 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.remove_alias_from_area
2023-06-01 18:58:51.003 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.disable_config_entry
2023-06-01 18:58:51.004 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.disable_config_entry
2023-06-01 18:58:51.006 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.remove_device_from_area
2023-06-01 18:58:51.006 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.remove_device_from_area
2023-06-01 18:58:51.008 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.add_entity_to_area
2023-06-01 18:58:51.009 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.add_entity_to_area
2023-06-01 18:58:51.011 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: select.random
2023-06-01 18:58:51.011 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: select.random
2023-06-01 18:58:51.015 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: input_select.sort
2023-06-01 18:58:51.015 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: input_select.sort
2023-06-01 18:58:51.016 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.delete_all_orphaned_entities
2023-06-01 18:58:51.016 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.delete_all_orphaned_entities
2023-06-01 18:58:51.018 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.enable_polling
2023-06-01 18:58:51.019 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.enable_polling
2023-06-01 18:58:51.020 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: number.increment
2023-06-01 18:58:51.021 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: number.increment
2023-06-01 18:58:51.023 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.create_area
2023-06-01 18:58:51.024 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.create_area
2023-06-01 18:58:51.026 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: input_number.max
2023-06-01 18:58:51.026 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: input_number.max
2023-06-01 18:58:51.028 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.ignore_all_discovered
2023-06-01 18:58:51.028 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.ignore_all_discovered
2023-06-01 18:58:51.030 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: input_number.min
2023-06-01 18:58:51.030 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: input_number.min
2023-06-01 18:58:51.032 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.enable_entity
2023-06-01 18:58:51.033 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.enable_entity
2023-06-01 18:58:51.035 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: input_select.random
2023-06-01 18:58:51.036 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: input_select.random
2023-06-01 18:58:51.038 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: number.decrement
2023-06-01 18:58:51.039 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: number.decrement
2023-06-01 18:58:51.042 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.remove_entity_from_area
2023-06-01 18:58:51.043 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.remove_entity_from_area
2023-06-01 18:58:51.044 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.hide_entity
2023-06-01 18:58:51.045 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.hide_entity
2023-06-01 18:58:51.047 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.add_alias_to_area
2023-06-01 18:58:51.048 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.add_alias_to_area
2023-06-01 18:58:51.050 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: recorder.import_statistics
2023-06-01 18:58:51.050 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: recorder.import_statistics
2023-06-01 18:58:51.052 DEBUG (MainThread) [custom_components.spook] Unregistering service that will be overriden service: input_number.decrement
2023-06-01 18:58:51.053 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: input_number.decrement
2023-06-01 18:58:51.054 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: input_number.decrement
2023-06-01 18:58:51.056 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.set_area_aliases
2023-06-01 18:58:51.056 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.set_area_aliases
2023-06-01 18:58:51.059 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.disable_polling
2023-06-01 18:58:51.059 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.disable_polling
2023-06-01 18:58:51.061 DEBUG (MainThread) [custom_components.spook] Registering Spook service: repairs.ignore_all
2023-06-01 18:58:51.061 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: repairs.ignore_all
2023-06-01 18:58:51.064 DEBUG (MainThread) [custom_components.spook] Registering Spook service: repairs.remove
2023-06-01 18:58:51.064 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: repairs.remove
2023-06-01 18:58:51.066 DEBUG (MainThread) [custom_components.spook] Registering Spook service: spook.random_fail
2023-06-01 18:58:51.068 DEBUG (MainThread) [custom_components.spook] Registering Spook service: spook.boo
2023-06-01 18:58:51.071 DEBUG (MainThread) [custom_components.spook] Registering Spook service: repairs.create
2023-06-01 18:58:51.071 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: repairs.create
2023-06-01 18:58:51.073 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: number.max
2023-06-01 18:58:51.074 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: number.max
2023-06-01 18:58:51.076 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.unhide_entity
2023-06-01 18:58:51.076 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.unhide_entity
2023-06-01 18:58:51.078 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.enable_device
2023-06-01 18:58:51.079 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.enable_device
2023-06-01 18:58:51.080 DEBUG (MainThread) [custom_components.spook] Registering Spook service: repairs.unignore_all
2023-06-01 18:58:51.081 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: repairs.unignore_all
2023-06-01 18:58:51.083 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.add_device_to_area
2023-06-01 18:58:51.084 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.add_device_to_area
2023-06-01 18:58:51.086 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: homeassistant.enable_config_entry
2023-06-01 18:58:51.086 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: homeassistant.enable_config_entry
2023-06-01 18:58:51.088 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: number.max
2023-06-01 18:58:51.088 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: number.max
2023-06-01 18:58:51.090 DEBUG (MainThread) [custom_components.spook] Registering Spook admin service: blueprint.import
2023-06-01 18:58:51.091 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: blueprint.import
2023-06-01 18:58:51.093 DEBUG (MainThread) [custom_components.spook] Registering Spook entity component service: input_select.shuffle
2023-06-01 18:58:51.093 DEBUG (MainThread) [custom_components.spook] Injecting Spook service schema for: input_select.shuffle
2023-06-01 18:58:51.097 DEBUG (MainThread) [custom_components.spook] Spook repair manager initialized
2023-06-01 18:59:42.359 DEBUG (MainThread) [custom_components.spook] Setting up Spook repairs
2023-06-01 18:59:42.370 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: script.script_unknown_entity_references
2023-06-01 18:59:42.378 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: automation.automation_unknown_device_references
2023-06-01 18:59:42.386 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: spook.obsolete_integration_yaml_config
2023-06-01 18:59:42.387 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: obsolete_integration_yaml_config
2023-06-01 18:59:43.171 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: automation.automation_unknown_area_references
2023-06-01 18:59:43.175 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: switch_as_x.switch_as_x_unknown_source
2023-06-01 18:59:43.180 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: automation.automation_unknown_entity_references
2023-06-01 18:59:43.187 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: spook.obsolete_platform_yaml_config
2023-06-01 18:59:43.187 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: obsolete_platform_yaml_config
2023-06-01 18:59:44.842 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: integration.integration_unknown_source
2023-06-01 18:59:44.849 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: lovelace.lovelace_unknown_entity_references
2023-06-01 18:59:44.860 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: group.group_unknown_members
2023-06-01 18:59:44.863 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: script.script_unknown_device_references
2023-06-01 18:59:44.866 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: script.script_unknown_area_references
2023-06-01 18:59:45.013 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
AttributeError: 'NoneType' object has no attribute '__name__'
2023-06-01 18:59:45.015 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
AttributeError: 'NoneType' object has no attribute '__name__'
2023-06-01 18:59:45.018 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
AttributeError: 'NoneType' object has no attribute '__name__'
2023-06-01 18:59:45.019 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
AttributeError: 'NoneType' object has no attribute '__name__'
2023-06-01 18:59:45.021 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
AttributeError: 'NoneType' object has no attribute '__name__'
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

@frenck
Copy link
Owner

frenck commented Jun 1, 2023

That is a helpful comment, thanks! 👍

../Frenck

@emufan
Copy link
Author

emufan commented Aug 14, 2023

This is here still there 1:1 only when Spook is enabled. Updated to 1.1.0 today. Currently on 2023.08.2. Still there. When disabled it is never occurring.

New snapshow

[...]
2023-08-14 17:12:45.262 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: script.script_unknown_area_references
2023-08-14 17:12:45.268 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: script.script_unknown_device_references
2023-08-14 17:12:45.284 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: integration.integration_unknown_source
2023-08-14 17:12:45.300 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: group.group_unknown_members
2023-08-14 17:12:45.331 DEBUG (MainThread) [custom_components.spook] Registering Spook repairs: switch_as_x.switch_as_x_unknown_source
2023-08-14 17:12:46.389 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'
2023-08-14 17:12:46.392 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'
2023-08-14 17:12:46.396 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'
2023-08-14 17:12:46.400 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'
2023-08-14 17:12:46.403 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
return await target
^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 187, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 115, in log_exception
friendly_msg = format_err(*args)
^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 207, in <lambda>
target.__name__,
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'
2023-08-14 17:12:55.151 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: lovelace_unknown_entity_references
2023-08-14 17:12:55.155 DEBUG (MainThread) [custom_components.spook] Config for dashboard lovelace not found, skipping
2023-08-14 17:12:55.155 ERROR (MainThread) [custom_components.spook] Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff74683420>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 116, in _handle_timer_finish
await task
File "/config/custom_components/spook/repairs.py", line 126, in _async_inspect
await self.async_inspect()
File "/config/custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py", line 112, in async_inspect
for entity_id in self.__async_extract_entities(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py", line 159, in __async_extract_entities
entities.update(self.__async_extract_entities_from_badge(badge))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py", line 207, in __async_extract_entities_from_badge
return set(config["entities"])
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'dict'
2023-08-14 17:12:55.208 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_entity_references
2023-08-14 17:12:55.226 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_area_references
2023-08-14 17:12:55.233 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_device_references
2023-08-14 17:12:55.257 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_entity_references
[...]

Where the last error is separated from the problem and I opened another issue for that in parallel.

@ReneNulschDE
Copy link

ReneNulschDE commented Jan 31, 2024

Hi,

I have read the license :-)

I can reproduce this in my environment too, but only when the log-level for spook is "info or higher". It does not happen when log-level is debug. With log-level debug all looks good.

Exception: https://homeass.ist/?14a611168633485d#5LdTbK4hC7sKrpknA4TJkzyMcaia3Mw1ZJR2YRXa8qjT

  • started in recovery mode --> no exception
  • removed all custom components (incl. spook) --> no exception
  • added only spook with default log-level critical --> exception
  • added only spook with default log-level critical and spook level: info --> exception
  • added only spook with default log-level critical and spook level: debug --> no exception

Log - default log-level critical and spook/spook_inverse level: debug Log: https://homeass.ist/?44cc21f2d17d8dc1#GxnY1UgNHgDCFFpqCM81HK1gLEpA1hAYv4PPUekpnT8w

Correction:
Now, I saw the exception with spook on log-level debug too. Started x0 times. The results are not reproducible. The only reproducible thing is that the exception shown on startup once only when spook is enabled.

Spook is running every minute:

2024-01-31 13:17:02.755 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: automation_unknown_entity_references
2024-01-31 13:17:02.756 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: lovelace_unknown_entity_references
2024-01-31 13:17:02.757 DEBUG (MainThread) [custom_components.spook] Spook found unknown entities in dashboard Overview and created an issue for it; Entities: too many...
2024-01-31 13:17:02.757 DEBUG (MainThread) [custom_components.spook] Spook is inspecting: script_unknown_entity_references

Example with exception (the HA cloud error comes up without spook too but the following exception is recorded with spook enabled only):

2024-01-31 13:20:49.684 DEBUG (MainThread) [custom_components.spook] Loading Spook event from ectoplasm: ectoplasms.repairs.event
2024-01-31 13:20:49.685 DEBUG (MainThread) [custom_components.spook] Setting up Spook ectoplasm event: ectoplasms.repairs.event
2024-01-31 13:20:49.693 DEBUG (MainThread) [custom_components.spook] Setting up Spook ectoplasm platform: time
2024-01-31 13:20:49.936 WARNING (MainThread) [py.warnings] /home/rene/repo/core/venv/lib/python3.12/site-packages/hass_nabucasa/acme.py:125: CryptographyDeprecationWarning: Properties that return a naïve datetime object have been deprecated. Please switch to not_valid_after_utc.
  return self._x509.not_valid_after.replace(tzinfo=UTC)

2024-01-31 13:20:49.944 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/rene/repo/core/homeassistant/util/logging.py", line 183, in coro_wrapper
    return await target
           ^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rene/repo/core/homeassistant/util/logging.py", line 185, in coro_wrapper
    log_exception(format_err, *args)
  File "/home/rene/repo/core/homeassistant/util/logging.py", line 101, in log_exception
    friendly_msg = format_err(*args)
                   ^^^^^^^^^^^^^^^^^

Environment:

System Information

version core-2024.2.0.dev0
installation_type Home Assistant Core
dev true
hassio false
docker false
user rene
virtualenv true
python_version 3.12.1
os_name Linux
os_version 6.5.0-15-generic
arch x86_64
timezone Europe/Berlin
config_dir /home/rene/.homeassistant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants