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

NoneType' object has no attribute 'type' after long runtime #23

Open
oggust opened this issue Apr 24, 2022 · 0 comments
Open

NoneType' object has no attribute 'type' after long runtime #23

oggust opened this issue Apr 24, 2022 · 0 comments

Comments

@oggust
Copy link

oggust commented Apr 24, 2022

This happens every once in a while for me, recently. I run prometheus-dyson (https://github.com/seanrees/prometheus-dyson)
but it doesn't seem like that's very involved here (eg the code doesn't make it to calling the callback).

Adding a None check seems simple but might just paper it over, I don't know why info would be None there.

This is after several days of runtime:

Traceback (most recent call last):
  File "/usr/lib64/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "/home/aug/.local/lib/python3.10/site-packages/zeroconf/_services/browser.py", line 532, in run
    self._fire_service_state_changed_event(event)
  File "/home/aug/.local/lib/python3.10/site-packages/zeroconf/_services/browser.py", line 416, in _fire_service_state_changed_event
    self._service_state_changed.fire(
  File "/home/aug/.local/lib/python3.10/site-packages/zeroconf/_services/__init__.py", line 55, in fire
    h(**kwargs)
  File "/home/aug/.local/lib/python3.10/site-packages/zeroconf/_services/browser.py", line 177, in on_change
    getattr(listener, _ON_CHANGE_DISPATCH[state_change])(zeroconf, service_type, name)
  File "/home/aug/.local/lib/python3.10/site-packages/libdyson/discovery.py", line 81, in add_service
    self._dyson_discovery.device_discovered(info)
  File "/home/aug/.local/lib/python3.10/site-packages/libdyson/discovery.py", line 37, in device_discovered
    if info.type == TYPE_DYSON_360_EYE:
AttributeError: 'NoneType' object has no attribute 'type'
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

1 participant