core: Wemo failing in logs during discovery

The problem

Not able to complete a “Check Configuration” on my instance, just spins and spins. Log shows pywemo failing after initiate a check everytime.

On startup, Wemo also fails during startup/restart

What is version of Home Assistant Core has the issue?

2021.3

What was the last working version of Home Assistant Core?

2021.2.3

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Wemo

Link to integration documentation on our website

https://www.home-assistant.io/integrations/wemo/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

 2021-03-03 19:18:24 DEBUG (SyncWorker_12) [homeassistant.util.yaml.loader] Secret unifi_ap_light_off retrieved from secrets.yaml in folder /home/homeassistant/.homeassistant
 2021-03-03 19:18:24 ERROR (MainThread) [aiohttp.server] Error handling request
 Traceback (most recent call last):
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
     resp = await self._request_handler(request)
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
     resp = await handler(request)
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
     return await handler(request)
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
     return await handler(request)
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
     return await handler(request)
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
     return await handler(request)
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 129, in auth_middleware
     return await handler(request)
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 129, in handle
     result = await result
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/components/config/core.py", line 29, in post
     errors = await async_check_ha_config_file(request.app["hass"])
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/config.py", line 885, in async_check_ha_config_file
     res = await check_config.async_check_ha_config_file(hass)
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/helpers/check_config.py", line 125, in async_check_ha_config_file
     component = integration.get_component()
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/loader.py", line 491, in get_component
     cache[self.domain] = importlib.import_module(self.pkg_path)
   File "/home/homeassistant/.pyenv/versions/3.8.6/lib/python3.8/importlib/__init__.py", line 127, in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
   File "<frozen importlib._bootstrap_external>", line 783, in exec_module
   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/homeassistant/components/wemo/__init__.py", line 4, in <module>
     import pywemo
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/pywemo/__init__.py", line 4, in <module>
     from .discovery import discover_devices, setup_url_for_address
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/pywemo/discovery.py", line 9, in <module>
     from . import ssdp
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/pywemo/ssdp.py", line 13, in <module>
     from .ouimeaux_device.api.service import REQUESTS_TIMEOUT
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/pywemo/ouimeaux_device/api/service.py", line 28, in <module>
     class Session:
   File "/srv/homeassistant/homeassistant_venv_3.8.6/lib/python3.8/site-packages/pywemo/ouimeaux_device/api/service.py", line 56, in Session
     retries = urllib3.Retry(
 TypeError: __init__() got an unexpected keyword argument 'allowed_methods'

Mentioned in another issue: https://github.com/home-assistant/core/issues/47330

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

The key to this issue is the TypeError: __init__() got an unexpected keyword argument 'allowed_methods' error message.

@mcaminiti could you start another issue for the Resubscribe error? I’d be curious which model the wemo devices are, and which version of Home Assistant 1) didn’t have the errors and 2) started having the errors.

Yes, this is a HA Core installation. I’ve upgraded urllib3 within the venv (and outside of the venv, just to be sure)

Perfect! Thanks for verifying.

Let’s keep this issue open for a bit. It’s likely there are others who will encounter this problem in the short term. Hopefully this makes the solution more discoverable.