bleak icon indicating copy to clipboard operation
bleak copied to clipboard

asyncio.exceptions.InvalidStateError: invalid state

Open snowuyl opened this issue 2 years ago • 2 comments

  • 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

  1. Downloading bleak v0.21.1 source code.
  2. Unzipping bleak-0.21.1.zip to D:\workspace_Python folder.
  3. cd D:\workspace_Python\bleak-0.21.1\examples
  4. 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

snowuyl avatar Nov 15 '23 03:11 snowuyl

The example is working for me. So more logs will be required to understand the problem.

dlech avatar Apr 29 '24 02:04 dlech