KeyError during discovery
See original GitHub issueA HA user has reported a KeyError whilst doing discovery. It looks like there might be a feature flag we don’t recognise. Their report is here.
File "/usr/local/lib/python3.7/site-packages/homekit/controller/controller.py", line 89, in discover
return discover_homekit_devices(max_seconds)
File "/usr/local/lib/python3.7/site-packages/homekit/zeroconf_impl/__init__.py", line 102, in discover_homekit_devices
info.properties
File "/usr/local/lib/python3.7/site-packages/homekit/zeroconf_impl/__init__.py", line 153, in parse_discovery_properties
d['flags'] = FeatureFlags[flags]
File "/usr/local/lib/python3.7/site-packages/homekit/model/feature_flags.py", line 33, in __getitem__
raise KeyError('Item {item} not found'.format(item=item))
KeyError: 'Item 2 not found'
I have asked what device they are trying to pair.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
KeyError in discovery.py · Issue #42 · noxrepo/pox - GitHub
POX throws the following exception when a socket error errno.EWOULDBLOCK is returned: Traceback (most recent call last): File ...
Read more >Performing google search in python with API, returned with ...
Make sure your configuration for "Custom Search" in your search engine app located at Setup ... Then KeyError exception won't happen.
Read more >docker_container_mem: crash during discovery: KeyError('stats')
The docker_container_mem section plugin crashed upon output from a container that was running, but did not provide any memory statistics. This may happen...
Read more >Python KeyError Exceptions and How to Handle Them
The Python KeyError is a type of LookupError exception and denotes that there was an issue retrieving the key you were looking for....
Read more >Python script depot - getting a KeyError when inputing key ...
When I send a dict of values (taken from a json file) to the score formula, I t ends up with KeyError (as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
0.15.0 is out for you!
@SimonThoustrup thanks for the comment but that should really go on the HASS ticket I mentioned unless you can reproduce it outside of HASS with the latest homekit_python package.
The fix is in a homekit_python release but it’s not yet in a HASS release, so there’s nothing to do on the homekit_python side.