I am trying to setup my device tracker to access my router, but I keep getting the following in the log file:
2018-02-10 21:54:40 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/asyncio/tasks.py”, line 182, in _step
result = coro.throw(exc)
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/init.py”, line 711, in async_device_tracker_scan
found_devices = yield from scanner.async_scan_devices()
File “/usr/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/huawei_router.py”, line 65, in scan_devices
self._update_info()
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/huawei_router.py”, line 82, in _update_info
data = self._get_data()
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/huawei_router.py”, line 99, in _get_data
array_regex_res = self.ARRAY_REGEX.search(self._get_devices_response())
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/huawei_router.py”, line 120, in _get_devices_response
cnt_str = str(cnt.content, cnt.apparent_encoding, errors=‘replace’)
TypeError: str() argument 2 must be str, not None
I have done as you said and stripped it right back. but I am still getting the same error:
2018-02-11 20:45:13 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/asyncio/tasks.py”, line 182, in _step
result = coro.throw(exc)
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/init.py”, line 711, in async_device_tracker_scan
found_devices = yield from scanner.async_scan_devices()
File “/usr/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/huawei_router.py”, line 65, in scan_devices
self._update_info()
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/huawei_router.py”, line 82, in _update_info
data = self._get_data()
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/huawei_router.py”, line 99, in _get_data
array_regex_res = self.ARRAY_REGEX.search(self._get_devices_response())
File “/usr/lib/python3.6/site-packages/homeassistant/components/device_tracker/huawei_router.py”, line 120, in _get_devices_response
cnt_str = str(cnt.content, cnt.apparent_encoding, errors=‘replace’)
TypeError: str() argument 2 must be str, not None
I’m not sure if it is just that my router is not compatible.
I haven’t got one but the only other thing that might help is putting the host: ip_addr in either single quotes or double quotes since it seems to be complaining about a string. Other than that I’m out of ideas , maybe someone that has the router will chime in