Replies: 4 comments 7 replies
-
There should only ever be one run loop run in your application. Please see the example programs for how to write a program that uses a single call to You can use |
Beta Was this translation helpful? Give feedback.
-
Thanks. Do you refer to any specific example in this case? because, I think that most of the examples are pretty basics. I am actually working on creating an application. The example scenario would be to let's say first check the available devices, then to connect to one of then and then send some values for the characteristics. The delay in this case would be user input based. |
Beta Was this translation helpful? Give feedback.
-
I think that with Kivy it will be difficult to deal with this issue. Because for buttons it needs only non-synchronous def functions. Which will close the event loop or starting again will give error. |
Beta Was this translation helpful? Give feedback.
-
I can confirm that the problem was not with the Bleak but with Kivy's asyncio implementation. |
Beta Was this translation helpful? Give feedback.
-
bluetoothctl -v
) in case of Linux: 5.56Description
I realized that calling the async function more than once or creating two saparate async function gives a runtime error "event loop is already closed". While searching for solution I found the suggestion to move everything with await in one function. While I may want to create another async function or call the same function more than once to see if the device is discover or new devices are available.
Beta Was this translation helpful? Give feedback.
All reactions