0.101.3 release problems!

About mqtt it seems

Can you just post it. Restart the system and post the whole error log

The whole log after installing 0.101.3 is the one i posted above…
Sorry to be so poor about it, but my english is not so good, just like my knowledge about python abd so on…

and if you comment out your whole mqtt section?

You mean this:

mqtt:
  broker: !secret mqtt_broker
  username: !secret mqtt_username
  password: !secret mqtt_password
  discovery: true

I have exactly the same behaviour/errors, and I could not find the issue so far

Ah good to know… i am not the only one… :joy:

I get these errors

[homeassistant.setup] Error during setup of component _____

where _____ are like almost all components … veru strange

Check this single post and see if it relates to your case

Yes, that whole section

This is the log after commenting out all the mqtt section and disabling legacy api_password.

2019-11-09 14:13:51 ERROR (MainThread) [homeassistant.setup] Setup failed for mqtt: unknown error
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 138, in _async_setup_component
    component = integration.get_component()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/loader.py", line 223, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/__init__.py", line 50, in <module>
    from . import config_flow, discovery, server  # noqa pylint: disable=unused-import
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/server.py", line 7, in <module>
    from hbmqtt.broker import Broker, BrokerException
  File "/srv/homeassistant/lib/python3.7/site-packages/hbmqtt/broker.py", line 6, in <module>
    import websockets
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/__init__.py", line 3, in <module>
    from .client import *
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 12, in <module>
    from .protocol import CONNECTING, OPEN, WebSocketCommonProtocol
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/protocol.py", line 17, in <module>
    from .compatibility import asyncio_ensure_future
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/compatibility.py", line 9
    asyncio_ensure_future = asyncio.async           # Python < 3.5
                                        ^
SyntaxError: invalid syntax
2019-11-09 14:16:16 ERROR (MainThread) [homeassistant.setup] Error during setup of component tts
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 172, in _async_setup_component
    hass, processed_config
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/tts/__init__.py", line 179, in async_setup
    await asyncio.wait(setup_tasks)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 363, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 456, in _wait
    await waiter
concurrent.futures._base.CancelledError
2019-11-09 14:16:16 ERROR (MainThread) [homeassistant.setup] Error during setup of component media_player
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/__main__.py", line 302, in setup_and_run_hass
    log_no_color=args.log_no_color,
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 146, in async_from_config_file
    config_dict, hass, enable_log=False, skip_pip=skip_pip
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 91, in async_from_config_dict
    await _async_set_up_integrations(hass, config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 372, in _async_set_up_integrations
    *(async_setup_component(hass, domain, config) for domain in domains_to_load)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 51, in async_setup_component
    return await task  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 147, in _async_setup_component
    hass, config, integration
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config.py", line 755, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/loader.py", line 232, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/__init__.py", line 50, in <module>
    from . import config_flow, discovery, server  # noqa pylint: disable=unused-import
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/server.py", line 7, in <module>
    from hbmqtt.broker import Broker, BrokerException
  File "/srv/homeassistant/lib/python3.7/site-packages/hbmqtt/broker.py", line 6, in <module>
    import websockets
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/__init__.py", line 3, in <module>
    from .client import *
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 12, in <module>
    from .protocol import CONNECTING, OPEN, WebSocketCommonProtocol
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/protocol.py", line 17, in <module>
    from .compatibility import asyncio_ensure_future
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/compatibility.py", line 9
    asyncio_ensure_future = asyncio.async           # Python < 3.5
                                        ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 172, in _async_setup_component
    hass, processed_config
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/__init__.py", line 223, in async_setup
    await component.async_setup(config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 121, in async_setup
    await asyncio.wait(tasks)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 363, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 456, in _wait
    await waiter
concurrent.futures._base.CancelledError
2019-11-09 14:16:16 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error in data received
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/__main__.py", line 302, in setup_and_run_hass
    log_no_color=args.log_no_color,
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 146, in async_from_config_file
    config_dict, hass, enable_log=False, skip_pip=skip_pip
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 91, in async_from_config_dict
    await _async_set_up_integrations(hass, config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 372, in _async_set_up_integrations
    *(async_setup_component(hass, domain, config) for domain in domains_to_load)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 51, in async_setup_component
    return await task  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 147, in _async_setup_component
    hass, config, integration
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config.py", line 755, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/loader.py", line 232, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/__init__.py", line 50, in <module>
    from . import config_flow, discovery, server  # noqa pylint: disable=unused-import
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/server.py", line 7, in <module>
    from hbmqtt.broker import Broker, BrokerException
  File "/srv/homeassistant/lib/python3.7/site-packages/hbmqtt/broker.py", line 6, in <module>
    import websockets
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/__init__.py", line 3, in <module>
    from .client import *
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 12, in <module>
    from .protocol import CONNECTING, OPEN, WebSocketCommonProtocol
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/protocol.py", line 17, in <module>
    from .compatibility import asyncio_ensure_future
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/compatibility.py", line 9
    asyncio_ensure_future = asyncio.async           # Python < 3.5
                                        ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 207, in feed_ssldata
    self._sslobj.unwrap()
  File "/usr/local/lib/python3.7/ssl.py", line 767, in unwrap
    return self._sslobj.shutdown()
ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2605)
2019-11-09 14:16:16 ERROR (MainThread) [homeassistant.setup] Error during setup of component browser_mod
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/__main__.py", line 302, in setup_and_run_hass
    log_no_color=args.log_no_color,
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 146, in async_from_config_file
    config_dict, hass, enable_log=False, skip_pip=skip_pip
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 91, in async_from_config_dict
    await _async_set_up_integrations(hass, config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 372, in _async_set_up_integrations
    *(async_setup_component(hass, domain, config) for domain in domains_to_load)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 51, in async_setup_component
    return await task  # type: ignore
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 147, in _async_setup_component
    hass, config, integration
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config.py", line 755, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/loader.py", line 232, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/__init__.py", line 50, in <module>
    from . import config_flow, discovery, server  # noqa pylint: disable=unused-import
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/server.py", line 7, in <module>
    from hbmqtt.broker import Broker, BrokerException
  File "/srv/homeassistant/lib/python3.7/site-packages/hbmqtt/broker.py", line 6, in <module>
    import websockets
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/__init__.py", line 3, in <module>
    from .client import *
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/client.py", line 12, in <module>
    from .protocol import CONNECTING, OPEN, WebSocketCommonProtocol
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/protocol.py", line 17, in <module>
    from .compatibility import asyncio_ensure_future
  File "/srv/homeassistant/lib/python3.7/site-packages/websockets/compatibility.py", line 9
    asyncio_ensure_future = asyncio.async           # Python < 3.5
                                        ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 172, in _async_setup_component
    hass, processed_config
  File "/home/homeassistant/.homeassistant/custom_components/browser_mod/__init__.py", line 29, in async_setup
    await hass.helpers.discovery.async_load_platform("sensor", DOMAIN, {}, config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/discovery.py", line 151, in async_load_platform
    setup_success = await setup.async_setup_component(hass, component, hass_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
concurrent.futures._base.CancelledError
2019-11-09 14:16:21 ERROR (Thread-2) [xiaomi_gateway] Cannot process multicast message: {'cmd': 'heartbeat', 'model': 'magnet', 'sid': '158d0002c7e0d8', 'short_id': 6043, 'data': '{"voltage":3015,"status":"open"}'}
2019-11-09 14:16:28 ERROR (Thread-2) [xiaomi_gateway] Cannot process multicast message: {'cmd': 'report', 'model': 'sensor_motion.aq2', 'sid': '158d0001ddac9e', 'short_id': 64952, 'data': '{"lux":"4"}'}
2019-11-09 14:16:28 ERROR (Thread-2) [xiaomi_gateway] Cannot process multicast message: {'cmd': 'report', 'model': 'sensor_motion.aq2', 'sid': '158d0001ddac9e', 'short_id': 64952, 'data': '{"status":"motion"}'}
2019-11-09 14:16:33 ERROR (Thread-2) [xiaomi_gateway] Cannot process multicast message: {'cmd': 'report', 'model': 'gateway', 'sid': '7811dcb25b7c', 'short_id': 0, 'data': '{"rgb":0,"illumination":534}'}
2019-11-09 14:16:34 ERROR (Thread-2) [xiaomi_gateway] Cannot process multicast message: {'cmd': 'report', 'model': 'gateway', 'sid': '7811dcb25b7c', 'short_id': 0, 'data': '{"rgb":0,"illumination":538}'}

As you see the log is the same as before…

turn off discovery as well

Other strange thing:

pi@hassbian:~$ sudo su -s /bin/bash homeassistant
homeassistant@hassbian:/home/pi $ python3 -V
Python 3.7.3
homeassistant@hassbian:/home/pi $ source /srv/homeassistant/bin/activate
(homeassistant) homeassistant@hassbian:/home/pi $ python3 -V
Python 3.7.2

Why the version is different

because the venv was created with Python 3.7.2 but the default Python on your system is Python 3.7.3.

The other errors you’re showing, where the code flow seems to think you have Python < 3.5 yet you are showing Python 3.7.2, means your venv might be corrupted.

I would do this:

  1. stop home assistant
  2. rename your current venv to venv-old (incase you need to revert)
  3. create a new venv with the same directory name and location as the old one (as though you were installing home assistant from the very beginning)
  4. start home assistant again
  5. home assistant will take a while to start up the first time since it’ll need to get all the packages and such again.
1 Like

As still newbie, can you create a step by step process to do what you advice me?
Where i find the venv ? How to create a new venv following your advices?
I’ll appreciate it… Thanks

1 Like

I’m assuming you created the venv yourself since you were able to activate it and get the python version.

It can be in lots of different places depending on where you created it. Based on the shell output you pasted above, I would try this, but, it could break everything if my guesses are wrong. I’m assuming your home assistant config is not in /srv/homeassistant, for starters.

  1. stop home assistant
  2. make sure you are not in the venv (type “deactivate” in a shell to be sure. if you get “command not found” then you are good
  3. based on your shell output, you may need to be root. So… become root.
  4. cd /srv
  5. mv homeassistant homeassistant-old
  6. python3 -m venv homeassistant
  7. cd homeassistant
  8. source bin/activate
  9. python3 -m pip install homeassistant
  10. start home assistant

Ok after starting homeassistant again do I need to move all the configuration from the old to the one?
Ah, forgot… I used since the beginnings hassbian so I already had all configured in the sd card.

Assuming your configuration is not in /srv/homeassistant, and that your home assistant startup service is configured correctly… no… you shouldn’t have to move anything else. But it really depends on how you performed your initial setup.

This is what i have:

pi@hassbian:~$ cd /srv/homeassistant
pi@hassbian:/srv/homeassistant$ ls
bin  hassbian  include	lib  pyvenv.cfg  share
pi@hassbian:/srv/homeassistant$ 
pi@hassbian:/srv$ ls
appdaemon  homeassistant  homeassistant_3.5.3
pi@hassbian:/srv$ 

Looks like my instructions are probably safe then. Worst case, if it breaks. Just “mv homeassistant-old homeassistant” and you’re back to the way it was.