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

TPLink WR841N - Error setting up platform legacy tplink_router #47

Open
ReneHlouzek opened this issue Mar 20, 2023 · 0 comments
Open

TPLink WR841N - Error setting up platform legacy tplink_router #47

ReneHlouzek opened this issue Mar 20, 2023 · 0 comments

Comments

@ReneHlouzek
Copy link

Hello,
can you help me with this issue?
Device tracker doesnt work with my router.

Logger: homeassistant.components.device_tracker
Source: custom_components/tplink_router/device_tracker.py:451
Integration: Device tracker (documentation, issues)
First occurred: 10:10:07 AM (1 occurrences)
Last logged: 10:10:07 AM

Error setting up platform legacy tplink_router
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 282, in async_setup_legacy
scanner = await hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/tplink_router/device_tracker.py", line 56, in get_scanner
scanner = cls(config[DOMAIN])
File "/config/custom_components/tplink_router/device_tracker.py", line 83, in init
self.success_init = self._update_info()
File "/config/custom_components/tplink_router/device_tracker.py", line 451, in _update_info
session.get(base_url, headers=header)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 369, in prepare
self.prepare_headers(headers)
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 491, in prepare_headers
check_header_validity(header)
File "/usr/local/lib/python3.10/site-packages/requests/utils.py", line 1037, in check_header_validity
raise InvalidHeader(
requests.exceptions.InvalidHeader: Header part ('User-Agent') from {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0'} must be of type str or bytes, not <class 'multidict._multidict.istr'>

Thank you

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