异步 |如何解决“预期协程”错误?

问题描述 投票:0回答:0

我从这里获取了 two_devices.py 代码示例: https://github.com/hbldh/bleak/blob/develop/examples/two_devices.py

当我尝试执行它时,我收到以下错误:

Exception has occurred: ValueError
a coroutine was expected, got <_GatheringFuture pending>
  File "path to file", line 39, in <module>
    "F0CBEBD3-299B-4139-A9FC-44618C720157",
ValueError: a coroutine was expected, got <_GatheringFuture pending>

任何人都可以提供一些如何解决这个问题的建议吗?

python asynchronous async-await bluetooth python-asyncio
© www.soinside.com 2019 - 2024. All rights reserved.