Skip to content

Instantly share code, notes, and snippets.

@olorton
Created June 22, 2021 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olorton/91e0d779ffe72b23dbf123e7a4a7050a to your computer and use it in GitHub Desktop.
Save olorton/91e0d779ffe72b23dbf123e7a4a7050a to your computer and use it in GitHub Desktop.
example output of intermittent error with bleak
(oxhome-UL5lUEBP) ~/Code/oxhome $ ./test.py
zsh: permission denied: ./test.py
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Traceback (most recent call last):
File "./test.py", line 18, in <module>
loop.run_until_complete(print_services("208FFF79-B315-4CC9-B842-95DC854B4D6C"))
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
return future.result()
File "./test.py", line 13, in print_services
async with BleakClient(device) as client:
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/client.py", line 61, in __aenter__
await self.connect()
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/client.py", line 118, in connect
await manager.connect(self._peripheral, disconnect_callback, timeout=timeout)
File "/Users/oliver/.local/share/virtualenvs/oxhome-UL5lUEBP/lib/python3.7/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 157, in connect
await asyncio.wait_for(future, timeout=timeout)
File "/Users/oliver/.pyenv/versions/3.7.9/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
(oxhome-UL5lUEBP) ~/Code/oxhome $ python ./test.py
Services: <bleak.backends.service.BleakGATTServiceCollection object at 0x10f437a50>
(oxhome-UL5lUEBP) ~/Code/oxhome $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment