New message in log "UVLoop"

I have started receiving a log message that I can’t figure out how to handle

You are using UVLoop with stream and shell_command. This is known to cause issues. Please uninstall uvloop.

What does that mean and how can I unistall uvloop?

I cant find any info about this

2 Likes

Yeah I’ve got this error too, but I’m not using shell command.

If I also have the same error … and I have no idea where it came from

Same error here

this message comming from the source of home assistant. But the uvloop should be remove [https://github.com/home-assistant/home-assistant/pull/25929].

if i remove "stream:’ in my config, the stream platform still there!! :frowning:

you can try to use command line switch instead shell command, but you cannot have dynamics parameters.

@Breakerz: I am a bit of a nube here… how do i install that pull on my set-up? I gotta get rid of that UVloop.

1 Like

Got the same error. Now my shell_command no longer works, it used to. Worst, doing shell_command make HA unaccessible until I restart it via docker. Running HA on Docker on Armbian.

1 Like

Yeah, I don’t know how to even get into my Docker to restart when it freezes… I end up SSHing in to sudo reboot. Can’t be good for the SD card.

1 Like

Bump!

Same error here (recent addition). Command line switches taking ages to respond too.

I have the exactly same problem…
Have you solved?
Thanks a lot
Stefano

1 Like

Same here, curious to what started causing this all of a sudden as everything was working fine.

2 Likes

SSH.
sudo docker restart homeassistant
(for default)

@Wolverine; I’ll give that a try.

@skynet01; In my case, the upgrade to Home Assistant 0.102.3.

@Wes93; Not solved per se, but my work-around has been to take out all shell_command entries out of my config.yaml, I am instead using command_line switches. A pain in the ass in the case of automations, but it didn’t freeze today. I do still get the error notices about UVLoop though.

…Now to deal with the weather being constantly sunny at night…

Can you elaborate on what you mean about not being able to use parameters with command line?

I’ve been having trouble for a long time with memory leaks and timeout issues with my command line and ping sensors so had to rewrite then using other components - I have stream enabled, I wonder if this has been the problem all along?

Does anyone know if shell_command will no longer work in the future as well or it’s just a temporary bug? Don’t want to rewrite my configs if all i have to do is wait

2 Likes

I don’t use shell_command and still I get this error in the log after each restart. Anyone here from the dev team that can help to tell from where this error origins and how int can be resolved?

1 Like

yup. same thing happens to me. I’m using hassio command to restart only hassio not a full reboot because that would be a pain
hassio homeassistant restart

This just started happening to me today and it keeps crashing the UI, I can restart from command line but HA never hung as many times as today and if I’m not at home it’s just dead. I have a few onvif cameras which never caused issues before.

I’m running 0.102.3 on a pi4 using HASSIO

Logs are pretty much saying this many times over:

2019-12-09 11:47:17 WARNING (MainThread) [homeassistant.components.stream] You are using UVLoop with stream and shell_command. This is known to cause issues. Please uninstall uvloop.
2019-12-09 12:29:19 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream: No dts in packet

What is uvloop and how do I kill it with fire?

Just started noticing the uvloop errors too in my home-assistant.log (running 0.102.3 in Docker on a nuc):

Error doing job: Exception in callback <function async_track_state_change.<locals>.state_change_listener at 0x7f5890071d40>
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 70, in uvloop.loop.Handle._run
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 104, in state_change_listener
    event.data.get("new_state"),
  File "/usr/src/homeassistant/homeassistant/core.py", line 371, in async_run_job
    target(*args)
  File "/usr/src/homeassistant/homeassistant/components/template/binary_sensor.py", line 182, in template_bsensor_state_listener
    self.async_check_state()
  File "/usr/src/homeassistant/homeassistant/components/template/binary_sensor.py", line 305, in async_check_state
    state = self._async_render()
  File "/usr/src/homeassistant/homeassistant/components/template/binary_sensor.py", line 244, in _async_render
    state = self._template.async_render().lower() == "true"
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 220, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 8, in top-level template code
  File "/usr/local/lib/python3.7/site-packages/jinja2/sandbox.py", line 440, in call
    return __context.call(__obj, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 980, in wrapper
    return func(hass, *args[1:], **kwargs)
TypeError: is_state() missing 1 required positional argument: 'state'

So no dev.
Tried to report an issue on github:
shell_command issue