-
Notifications
You must be signed in to change notification settings - Fork 24
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
Getting RuntimeError: Event loop is closed #13
Comments
I have the same issue 2 |
i updated python-dbus-fast to version 1.75 from 1.14 and it seems to work now |
Just want to confirm that everything works without any issues with AirPods2 Pro and this version of packages
|
there was a pull request to address airpods2 pro, but it doesnt look like it was merged. but otherwise this works for me with my airpods2 with these versions of python packages you listed. but there are others who still report they have issues getting it to work. |
[root@archlinux lib]# python3 airstatus.py
/usr/lib/airstatus.py:59: DeprecationWarning: There is no current event loop
loop = get_event_loop()
Traceback (most recent call last):
File "/usr/lib/airstatus.py", line 147, in
run()
File "/usr/lib/airstatus.py", line 132, in run
data = get_data()
File "/usr/lib/airstatus.py", line 68, in get_data
raw = get_data_hex()
File "/usr/lib/airstatus.py", line 60, in get_data_hex
a = loop.run_until_complete(get_device())
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/usr/lib/airstatus.py", line 43, in get_device
devices = await discover()
File "/usr/lib/python3.10/site-packages/bleak/backends/scanner.py", line 116, in discover
async with cls(**kwargs) as scanner:
File "/usr/lib/python3.10/site-packages/bleak/backends/scanner.py", line 96, in aenter
await self.start()
File "/usr/lib/python3.10/site-packages/bleak/backends/bluezdbus/scanner.py", line 137, in start
self._stop = await manager.active_scan(
File "/usr/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 384, in active_scan
reply = await self._bus.call(
File "/usr/lib/python3.10/site-packages/dbus_next/aio/message_bus.py", line 303, in call
self._call(msg, reply_handler)
File "/usr/lib/python3.10/site-packages/dbus_next/message_bus.py", line 588, in _call
self.send(msg)
File "/usr/lib/python3.10/site-packages/dbus_next/aio/message_bus.py", line 326, in send
self._writer.schedule_write(msg, future)
File "/usr/lib/python3.10/site-packages/dbus_next/aio/message_bus.py", line 85, in schedule_write
self.loop.add_writer(self.fd, self.write_callback)
File "/usr/lib/python3.10/asyncio/selector_events.py", line 341, in add_writer
self._add_writer(fd, callback, *args)
File "/usr/lib/python3.10/asyncio/selector_events.py", line 290, in _add_writer
self._check_closed()
File "/usr/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
The text was updated successfully, but these errors were encountered: