Skip to content
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

main.py output does not give battery #15

Open
M3CHR0M4NC3R opened this issue Dec 7, 2022 · 2 comments
Open

main.py output does not give battery #15

M3CHR0M4NC3R opened this issue Dec 7, 2022 · 2 comments

Comments

@M3CHR0M4NC3R
Copy link

When I ran main.py I get this output instead of my airpods batteries. Naturally, I also get a "-" for my battery status in Gnome too.

/home/sam/AirStatus/main.py:46: FutureWarning: The discover function will removed in a future version, use BleakScanner.discover instead.
  devices = await discover()
Traceback (most recent call last):
  File "/home/sam/AirStatus/main.py", line 156, in <module>
    run()
  File "/home/sam/AirStatus/main.py", line 139, in run
    data = get_data()
  File "/home/sam/AirStatus/main.py", line 74, in get_data
    raw = get_data_hex()
  File "/home/sam/AirStatus/main.py", line 67, in get_data_hex
    a = asyncio.run(get_device())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/sam/AirStatus/main.py", line 46, in get_device
    devices = await discover()
  File "/home/sam/.local/lib/python3.10/site-packages/bleak/__init__.py", line 216, in discover
    async with cls(**kwargs) as scanner:
  File "/home/sam/.local/lib/python3.10/site-packages/bleak/__init__.py", line 126, in __aenter__
    await self._backend.start()
  File "/home/sam/.local/lib/python3.10/site-packages/bleak/backends/bluezdbus/scanner.py", line 191, in start
    self._stop = await manager.active_scan(
  File "/home/sam/.local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 368, in active_scan
    assert_reply(reply)
  File "/home/sam/.local/lib/python3.10/site-packages/bleak/backends/bluezdbus/utils.py", line 20, in assert_reply
    raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.InProgress] Operation already in progress
@speedyvespa
Copy link

same issue here have you found a solution?

@mrsteve0924
Copy link

just started seeing this too. not sure what changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants