Skip to content

Instantly share code, notes, and snippets.

@webs86
Created August 10, 2020 07:57
Show Gist options
  • Save webs86/970be4baa0f2e960e4cca73f606cd6bf to your computer and use it in GitHub Desktop.
Save webs86/970be4baa0f2e960e4cca73f606cd6bf to your computer and use it in GitHub Desktop.
Logger: homeassistant.components.device_tracker
Source: components/bluetooth_le_tracker/device_tracker.py:189
Integration: Tracciatore dispositivo (documentation, issues)
First occurred: 9:41:04 (1 occurrences)
Last logged: 9:41:04
Error setting up platform legacy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/bluetooth_le_tracker/device_tracker.py", line 172, in update_ble
adapter.start(reset_on_start=True)
File "/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py", line 264, in start
self.reset()
File "/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py", line 631, in reset
subprocess.Popen(["sudo", "systemctl", "restart", "bluetooth"]).wait()
File "/usr/local/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'sudo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 71, in async_setup_legacy
setup = await hass.async_add_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/bluetooth_le_tracker/device_tracker.py", line 200, in setup_scanner
update_ble(dt_util.utcnow())
File "/usr/src/homeassistant/homeassistant/components/bluetooth_le_tracker/device_tracker.py", line 189, in update_ble
adapter.stop()
File "/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py", line 308, in stop
self.disconnect(self._connected_device)
File "/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py", line 50, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py", line 486, in disconnect
if not self._receiver.is_set("disconnected"):
AttributeError: 'NoneType' object has no attribute 'is_set'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment