I’ve searched on here and see this come up in posts for all kinds of different things so it’s pretty tough to nail down what has caused this error to appear 1200 times today (and it’s been that every day for the past month or so). I’ve disabled quite a few integrations, rebooted, purged my DB and nothing seems to correct it.
Logger: homeassistant
Source: util/logging.py:205
First occurred: January 3, 2024 at 10:24:15 PM (1200 occurrences)
Last logged: 4:03:24 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/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 "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
log_exception(format_err, *args)
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 101, in log_exception
friendly_msg = format_err(*args)
^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/logging.py", line 205, in <lambda>
target.__name__,
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'
As Four Wheeler i also had “multi much”, so i first reverted, then i cleaned out some templates from configuration.yaml , which was not “stue rene”( is there an english word for this ? ) , , so i was back on 2024.2.5, but rolled in xxxx 3.1 and now there’s nothing
I tracked this error down to a scene being applied by a script - purely because the automation that calls said script started failing to finish. Annoyingly the scene contains only one light group, and none of the logic contains anything out of the ordinary. I’ve disabled it for now but honestly don’t know why this was happening. It worked before just fine.
Notably I do not, nor have I ever, had spook installed.
Yes, coro_wrapper seem to handle some communication to certain function … that’s why i did alittle cleaning … in i.e own template-sensors
However never tracked it down to any specific … My lazy approach paid out this time
I believe the Disable-an-Integration is a “Service” in Spook, so these should not affect anything, unless executed/called
And as aredon mention, chance is it’s some “generic” communication, which affect “random” … judging by the various post here
As i have deleted those templates i suspected was “involved” maybe aredon’s script/templates can shed light on it
PS: @CFW , i saw you had alot(i eventually also had), but i thought i could see a “pattern” in the “time circles” the errors occurred in, that was basically one of the reasons to wipe these ( From config.yaml, and 1 card )
If the disable integration feature was a core feature I would not use Spook at all. I use it ro disable the Octopi integration. The Octopi integration is very noisy when the 3D printer is turned off and even more noise filling the log with errors when Octopi is shut down. I 3D print less that once per month and I save significant power by turning off everything when I do not print. But Octopi integration is created with the idea that you 3D print day and night. At least it does not behave very well when you don’t. So the spook integration is used to simply disble the Octoprint integration.
I am actually thinking about just removing the integration. It is not really of much use. When I 3D print, I have the Octoprint screen on my iPad or laptop and I actually have no automations related to Octoprint. It is like … we install integrations because we can without much through on why when we start this hobby
FOLLOW UP. Actually it is the ONVIF integration I disable which is used with a camera that films the 3D printer and it uses quite a lot of power, so I have a power switch to kill it when I do not print. And the ONVIF integration is also very noisy when a camera is off line. I had already permanently removed the Octoprint integration.
I went through all the Spook entities and disabled them in a sytematic way and the conclusion is that it is Spook’s 5 Home Assistant Cloud switches that generate the 5 errors in the log. So now I have disabled everything Spook and only use the service to disable/enable the ONVIF integration when I turn the power to my camera and Octopi off and on.
Ok, yes those entities i have not enabled, Spook Helps me with keeping “Check” upon missing/wrong entities etc( few “templates” ( as i do my own i.e more correct counts etc ), and i use the Services, so i actually use( have enabled ) less than 10 entities/features ( And would not be without them )
Which seem to support my suspicion , coro -wrapper communicates with certain API’s
Beside i have a feeling that i.e “templates” lately got a more “restrict” interpretion , maybe it’s become less “forgiving” for certain ways of writing i.e jinja2
Few release ago, i got similar errors after an upgrade with i could track to some of my templates( Templates which had been working for year or so, which had to be re-written ) For some unknown reason, maybe a “bump” to newer versions of i.e jinja etc
Nice catch! I haven’t seen errors since upgrading to 2024.3.1 but I had three of those service running and I don’t use them anyway. Spook just catches orphans and toggles integrations (like you, I do the same, when I shut off my theater it turns off that particular AppleTV integration, etc - a dozen or so such automations).