fbradyirl / openwrt-luci-rpc

Other
34 stars 22 forks source link

Int is not iterable error #44

Open tim-devel opened 3 years ago

tim-devel commented 3 years ago

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

Luci RPC is throwing an error when used with home assistant

What I Did

I am struggling to work out what is triggering this. It happens once or twice a day at most. I am happy to debug further if you have any ideas

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

Nov  8 16:22:04 pi4 hass[1034]: #033[31m2020-11-08 16:22:04 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved#033[0m
Nov  8 16:22:04 pi4 hass[1034]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/device_tracker/setup.py", line 161, in async_device_tracker_scan
Nov  8 16:22:04 pi4 hass[1034]:     found_devices = await scanner.async_scan_devices()
Nov  8 16:22:04 pi4 hass[1034]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/device_tracker/legacy.py", line 482, in async_scan_devices
Nov  8 16:22:04 pi4 hass[1034]:     return await self.hass.async_add_executor_job(self.scan_devices)
Nov  8 16:22:04 pi4 hass[1034]:   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
Nov  8 16:22:04 pi4 hass[1034]:     result = self.fn(*self.args, **self.kwargs)
Nov  8 16:22:04 pi4 hass[1034]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/luci/device_tracker.py", line 63, in scan_devices
Nov  8 16:22:04 pi4 hass[1034]:     self._update_info()
Nov  8 16:22:04 pi4 hass[1034]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/luci/device_tracker.py", line 91, in _update_info
Nov  8 16:22:04 pi4 hass[1034]:     result = self.router.get_all_connected_devices(only_reachable=True)
Nov  8 16:22:04 pi4 hass[1034]:   File "/srv/homeassistant/lib/python3.8/site-packages/openwrt_luci_rpc/__init__.py", line 42, in get_all_connected_devices
Nov  8 16:22:04 pi4 hass[1034]:     return self.router.get_all_connected_devices(
Nov  8 16:22:04 pi4 hass[1034]:   File "/srv/homeassistant/lib/python3.8/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 175, in get_all_connected_devices
Nov  8 16:22:04 pi4 hass[1034]:     if "mac" not in device_entry:
Nov  8 16:22:04 pi4 hass[1034]: TypeError: argument of type 'int' is not iterable#033[0m