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

Missing Listener method for current zeroconf library #1101

Closed
valpackett opened this issue Jul 25, 2021 · 0 comments · Fixed by #1112
Closed

Missing Listener method for current zeroconf library #1101

valpackett opened this issue Jul 25, 2021 · 0 comments · Fixed by #1112
Labels

Comments

@valpackett
Copy link
Contributor

Describe the bug
The current version of the zeroconf library requires defining an update_service method (even if empty).
It does not exist, so the discover command crashes.

Version information (please complete the following information):

  • OS: FreeBSD -CURRENT
  • python-miio: 0.5.6

To Reproduce
Steps to reproduce the behavior:

  1. pipx install python-miio
  2. miiocli discover

Console output

INFO:miio.miioprotocol:Sending discovery to <broadcast> with timeout of 5s..
INFO:miio.miioprotocol:Discovery done
INFO:miio.discovery:Discovering devices with mDNS for 5 seconds...
/home/greg/.local/pipx/venvs/python-miio/lib/python3.9/site-packages/zeroconf/_services/browser.py:170: FutureWarning: <miio.discovery.Listener object at 0x1a170efcef70> has no update_service method. Provide one (it can be empty if you don't care about the updates), it'll become mandatory.
  warnings.warn(
WARNING:miio.discovery:Found unsupported device [REDACTED], please report to developers
Exception in thread zeroconf-ServiceBrowser-_miio._udp-107102:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/home/greg/.local/pipx/venvs/python-miio/lib/python3.9/site-packages/zeroconf/_services/browser.py", line 536, in run
    self._fire_service_state_changed_event(event)
  File "/home/greg/.local/pipx/venvs/python-miio/lib/python3.9/site-packages/zeroconf/_services/browser.py", line 423, in _fire_service_state_changed_event
    self._service_state_changed.fire(
  File "/home/greg/.local/pipx/venvs/python-miio/lib/python3.9/site-packages/zeroconf/_services/__init__.py", line 56, in fire
    h(**kwargs)
  File "/home/greg/.local/pipx/venvs/python-miio/lib/python3.9/site-packages/zeroconf/_services/browser.py", line 179, in on_change
    getattr(listener, _ON_CHANGE_DISPATCH[state_change])(zeroconf, service_type, name)
AttributeError: 'Listener' object has no attribute 'update_service'
@valpackett valpackett added the bug label Jul 25, 2021
rytilahti added a commit that referenced this issue Aug 12, 2021
This callback does not currently do anything, just avoids a warning
about it being missing on recent python-zeroconf versions.

Fixes #1101
rytilahti added a commit that referenced this issue Aug 12, 2021
This callback does not currently do anything, just avoids a warning
about it being missing on recent python-zeroconf versions.

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

Successfully merging a pull request may close this issue.

1 participant