-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BleCommunicationBleak doesn't work with asyncio.run() on Python 3.9 #186
Comments
How should this problem be approached? I see multiple options:
For me investigating is difficult as I cannot reproduce the problem on Linux and I don't want to start to mess around with Python on Windows. |
I think we should go with option number 1, but that would then require some one with a Windows. I would assume that the problem is that queue must be created inside the async loop, as if import is inside |
This issue reproduces on Python 3.9 on MacOS and Linux, and probably earlier versions. The root cause is just as suggested, the The curious thing here is that it does work on Python 3.10 and later, even though nothing in the changelogs suggest a change in this behaviour. I was able to track it down to a side-effect of the removal of the I might look to fix this sometime soon, it shouldn't be too hard. |
Worked around with instructions from ruuvitag-sensor issue. Bug: ttu/ruuvitag-sensor#186
Platform: Windows, macOS, Linux?
Python version: 3.9
Error:
When import statement in e.g. example is moved to inside
run()
-function, it works normally:Possible same situation:
https://stackoverflow.com/questions/53724665/using-queues-results-in-asyncio-exception-got-future-future-pending-attached
The text was updated successfully, but these errors were encountered: