bleak
bleak copied to clipboard
asyncio.exceptions.InvalidStateError: invalid state
- bleak version: v0.21.1
- Python version: v3.11.5
- Operating System: Windows 11
Description
I run uart_service.py and I encountered asyncio.exceptions.InvalidStateError: invalid state.
What I Did
- Downloading bleak v0.21.1 source code.
- Unzipping bleak-0.21.1.zip to D:\workspace_Python folder.
- cd D:\workspace_Python\bleak-0.21.1\examples
- python3 uart_service.py
Logs
D:\workspace_Python\bleak-0.21.1\examples>python3 uart_service.py
Device was disconnected, goodbye.
Exception in callback Future.set_result(<Future cancelled>, <GattCommunic...NREACHABLE: 1>)
handle: <Handle Future.set_result(<Future cancelled>, <GattCommunic...NREACHABLE: 1>)>
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
asyncio.exceptions.InvalidStateError: invalid state
The example is working for me. So more logs will be required to understand the problem.