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

Error with discovering mugs #62

Open
barak-obama opened this issue Mar 10, 2024 · 3 comments
Open

Error with discovering mugs #62

barak-obama opened this issue Mar 10, 2024 · 3 comments

Comments

@barak-obama
Copy link

  • Python Ember Mug version: 1.0.0
  • Python version: 3.11.6
  • Operating System: macOS 14.2.1 (23C71)

Description

The software stopped working, probably due to changed in the Bleak Library.
I have runned "ember-mug discover" and got an error.

ember-mug discover

Traceback (most recent call last):
  File "/opt/homebrew/bin/ember-mug", line 8, in <module>
    sys.exit(run_cli())
             ^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/ember_mug/cli/__init__.py", line 13, in run_cli
    asyncio.run(cli.run())
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/ember_mug/cli/commands.py", line 257, in run
    await self._commands[args.command](args)
  File "/opt/homebrew/lib/python3.11/site-packages/ember_mug/cli/commands.py", line 64, in discover
    mugs = await discover_mugs(mac=args.mac)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/ember_mug/scanner.py", line 47, in discover_mugs
    return [
           ^
  File "/opt/homebrew/lib/python3.11/site-packages/ember_mug/scanner.py", line 49, in <listcomp>
    for (d, a) in scanner.discovered_devices_and_advertisement_data
        ^^^^^^
ValueError: too many values to unpack (expected 2)
@sopelj sopelj closed this as completed in f4aeac7 Mar 10, 2024
@sopelj
Copy link
Owner

sopelj commented Mar 10, 2024

Oops, no, this is a mistake on my end. Sorry about that. Should be fixed in v1.0.1b1

@sopelj sopelj reopened this Mar 10, 2024
@barak-obama
Copy link
Author

I've downloaded v1.0.1b1 and lots of other stuff are broken, I suspect its AdvertisementData related. I've tried to poke around but its byonde my skill limit.

@sopelj
Copy link
Owner

sopelj commented Mar 11, 2024

Do you have any more information than that it's "broken"? I'd be happy to try and fix it, but I'd need more information. Such as the actual errors and what you are trying to do.

I did run this and the "discover" method now works fine for me, however. So, I'd be tempted to resolve this issue. I see that you are on macOS, so I think if you are running into issues it is likely that, that is the reason. If you would like to open issues for that I'd be happy to try and resolve them, however I do not have a Mac to test with.

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

2 participants