Problem on Pyton 3.7 upgrade

2019-07-20 17:38:30 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-07-20 17:38:30 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for shelly which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-07-20 17:38:30 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-07-20 17:38:31 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-07-20 17:38:32 WARNING (MainThread) [homeassistant.components.xiaomi_aqara] Key is not provided for gateway None. Controlling the gateway will not be possible
2019-07-20 17:38:39 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Cam Soppalco for homekit_controller
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 356, in get_session_keys
    accessory_ltpk.verify(bytes(accessory_sig), bytes(accessory_info))
  File "/srv/homeassistant/lib/python3.7/site-packages/ed25519/keys.py", line 177, in verify
    msg2 = _ed25519.open(sig_and_msg, self.vk_s)
ed25519.BadSignatureError: Bad Signature

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 153, in async_setup
    hass, self)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/__init__.py", line 178, in async_setup_entry
    if not await conn.async_setup():
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 88, in async_setup
    return await self.async_refresh_entity_map(self.config_num)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 111, in async_refresh_entity_map
    self.pairing.list_accessories_and_characteristics
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 73, in list_accessories_and_characteristics
    self.session = IpSession(self.pairing_data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 416, in __init__
    c2a_key, a2c_key = get_session_keys(conn, pairing_data, write_fun)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 358, in get_session_keys
    raise InvalidSignatureError('step 3')
homekit.exceptions.InvalidSignatureError: step 3
2019-07-20 17:38:39 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.command_line]: [unit_Of_measurement] is an invalid option for [sensor.command_line]. Check: sensor.command_line->unit_Of_measurement. (See /home/homeassistant/.homeassistant/packages/info_sensors/info_sensors.yaml, line 114). Please check the docs at https://home-assistant.io/components/sensor.command_line/
2019-07-20 17:38:40 ERROR (SyncWorker_1) [homeassistant.components.filesize.sensor] Filepath /home/homeassistant/.homeassistant/home-assistant_v2.db is not valid or allowed
2019-07-20 17:38:40 ERROR (SyncWorker_5) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://192.168.0.15:8123/api/config failed with HTTPConnectionPool(host='192.168.0.15', port=8123): Max retries exceeded with url: /api/config (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xe51d8a8c>: Failed to establish a new connection: [Errno 111] Connection refused'))
2019-07-20 17:38:40 ERROR (SyncWorker_1) [homeassistant.components.command_line.sensor] Command failed: /config/html/versionsonoffhtml.sh
2019-07-20 17:38:40 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 30 seconds.
2019-07-20 17:38:42 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [minutes] is an invalid option for [automation]. Check: automation->trigger->0->minutes. (See /home/homeassistant/.homeassistant/packages/battery_alert/battery_alert.yaml, line 122). Please check the docs at https://home-assistant.io/components/automation/
2019-07-20 17:38:43 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds.
2019-07-20 17:38:43 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Cam Terrazzo for homekit_controller
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 356, in get_session_keys
    accessory_ltpk.verify(bytes(accessory_sig), bytes(accessory_info))
  File "/srv/homeassistant/lib/python3.7/site-packages/ed25519/keys.py", line 177, in verify
    msg2 = _ed25519.open(sig_and_msg, self.vk_s)
ed25519.BadSignatureError: Bad Signature

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 153, in async_setup
    hass, self)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/__init__.py", line 178, in async_setup_entry
    if not await conn.async_setup():
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 88, in async_setup
    return await self.async_refresh_entity_map(self.config_num)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 111, in async_refresh_entity_map
    self.pairing.list_accessories_and_characteristics
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 73, in list_accessories_and_characteristics
    self.session = IpSession(self.pairing_data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 416, in __init__
    c2a_key, a2c_key = get_session_keys(conn, pairing_data, write_fun)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 358, in get_session_keys
    raise InvalidSignatureError('step 3')
homekit.exceptions.InvalidSignatureError: step 3
2019-07-20 17:38:47 ERROR (MainThread) [homeassistant.components.sensor] alpha_vantage: Error on device update!
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 380, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/alpha_vantage/sensor.py", line 210, in update
    from_currency=self._from_currency, to_currency=self._to_currency)
  File "/srv/homeassistant/lib/python3.7/site-packages/alpha_vantage/alphavantage.py", line 178, in _format_wrapper
    data = call_response[data_key]
KeyError: 'Realtime Currency Exchange Rate'
2019-07-20 17:38:50 ERROR (SyncWorker_4) [homeassistant.components.ios.notify] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
2019-07-20 17:38:51 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Cam Conigli for homekit_controller
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 356, in get_session_keys
    accessory_ltpk.verify(bytes(accessory_sig), bytes(accessory_info))
  File "/srv/homeassistant/lib/python3.7/site-packages/ed25519/keys.py", line 177, in verify
    msg2 = _ed25519.open(sig_and_msg, self.vk_s)
ed25519.BadSignatureError: Bad Signature

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 153, in async_setup
    hass, self)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/__init__.py", line 178, in async_setup_entry
    if not await conn.async_setup():
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 88, in async_setup
    return await self.async_refresh_entity_map(self.config_num)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 111, in async_refresh_entity_map
    self.pairing.list_accessories_and_characteristics
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 73, in list_accessories_and_characteristics
    self.session = IpSession(self.pairing_data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 416, in __init__
    c2a_key, a2c_key = get_session_keys(conn, pairing_data, write_fun)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 358, in get_session_keys
    raise InvalidSignatureError('step 3')
homekit.exceptions.InvalidSignatureError: step 3
2019-07-20 17:38:51 ERROR (SyncWorker_3) [homeassistant.components.xiaomi_aqara] No gateway discovered
2019-07-20 17:38:51 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Integration failed to initialize.
2019-07-20 17:38:52 WARNING (MainThread) [homeassistant.components.switch] Setup of platform broadlink is taking over 10 seconds.
2019-07-20 17:38:56 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Cam Mini Pano for homekit_controller
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 356, in get_session_keys
    accessory_ltpk.verify(bytes(accessory_sig), bytes(accessory_info))
  File "/srv/homeassistant/lib/python3.7/site-packages/ed25519/keys.py", line 177, in verify
    msg2 = _ed25519.open(sig_and_msg, self.vk_s)
ed25519.BadSignatureError: Bad Signature

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 153, in async_setup
    hass, self)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/__init__.py", line 178, in async_setup_entry
    if not await conn.async_setup():
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 88, in async_setup
    return await self.async_refresh_entity_map(self.config_num)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 111, in async_refresh_entity_map
    self.pairing.list_accessories_and_characteristics
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 73, in list_accessories_and_characteristics
    self.session = IpSession(self.pairing_data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 416, in __init__
    c2a_key, a2c_key = get_session_keys(conn, pairing_data, write_fun)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 358, in get_session_keys
    raise InvalidSignatureError('step 3')
homekit.exceptions.InvalidSignatureError: step 3
2019-07-20 17:38:57 ERROR (SyncWorker_8) [homeassistant.components.broadlink.switch] Failed to connect to device
2019-07-20 17:38:58 ERROR (Thread-2) [pyShelly] Error receiving UDP: 'NoneType' object has no attribute 'add_job', Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 825, in _udp_reader
    self.blocks[id].update(data, addr[0])
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 99, in update
    dev.update(data)
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 376, in update
    self._update(new_state, None, new_values)
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 332, in _update
    self._raise_updated()
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 340, in _raise_updated
    callback(self)
  File "/home/homeassistant/.homeassistant/custom_components/shelly/__init__.py", line 297, in _updated
    self.schedule_update_ha_state(True)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 339, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 825, in _udp_reader
    self.blocks[id].update(data, addr[0])
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 99, in update
    dev.update(data)
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 376, in update
    self._update(new_state, None, new_values)
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 332, in _update
    self._raise_updated()
  File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 340, in _raise_updated
    callback(self)
  File "/home/homeassistant/.homeassistant/custom_components/shelly/__init__.py", line 297, in _updated
    self.schedule_update_ha_state(True)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 339, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'
2019-07-20 17:38:58 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 356, in get_session_keys
    accessory_ltpk.verify(bytes(accessory_sig), bytes(accessory_info))
  File "/srv/homeassistant/lib/python3.7/site-packages/ed25519/keys.py", line 177, in verify
    msg2 = _ed25519.open(sig_and_msg, self.vk_s)
ed25519.BadSignatureError: Bad Signature

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 111, in async_refresh_entity_map
    self.pairing.list_accessories_and_characteristics
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 73, in list_accessories_and_characteristics
    self.session = IpSession(self.pairing_data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 416, in __init__
    c2a_key, a2c_key = get_session_keys(conn, pairing_data, write_fun)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 358, in get_session_keys
    raise InvalidSignatureError('step 3')
homekit.exceptions.InvalidSignatureError: step 3
2019-07-20 17:38:58 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 356, in get_session_keys
    accessory_ltpk.verify(bytes(accessory_sig), bytes(accessory_info))
  File "/srv/homeassistant/lib/python3.7/site-packages/ed25519/keys.py", line 177, in verify
    msg2 = _ed25519.open(sig_and_msg, self.vk_s)
ed25519.BadSignatureError: Bad Signature

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/connection.py", line 111, in async_refresh_entity_map
    self.pairing.list_accessories_and_characteristics
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 73, in list_accessories_and_characteristics
    self.session = IpSession(self.pairing_data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 416, in __init__
    c2a_key, a2c_key = get_session_keys(conn, pairing_data, write_fun)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 358, in get_session_keys
    raise InvalidSignatureError('step 3')
homekit.exceptions.InvalidSignatureError: step 3
2019-07-20 17:38:58 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 356, in get_session_keys
    accessory_ltpk.verify(bytes(accessory_sig), bytes(accessory_info))
  File "/srv/homeassistant/lib/python3.7/site-packages/ed25519/keys.py", line 177, in verify
    msg2 = _ed25519.open(sig_and_msg, self.vk_s)
ed25519.BadSignatureError: Bad Signature

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 71, in async_init
    return await self._async_handle_step(flow, flow.init_step, data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 123, in _async_handle_step
    result = await getattr(flow, method)(user_input)  # type: Dict
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/config_flow.py", line 178, in async_step_zeroconf
    old_pairings[hkid]
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/config_flow.py", line 225, in async_import_legacy_pairing
    return await self._entry_from_accessory(pairing)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/homekit_controller/config_flow.py", line 336, in _entry_from_accessory
    pairing.list_accessories_and_characteristics
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 73, in list_accessories_and_characteristics
    self.session = IpSession(self.pairing_data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 416, in __init__
    c2a_key, a2c_key = get_session_keys(conn, pairing_data, write_fun)
  File "/srv/homeassistant/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 358, in get_session_keys
    raise InvalidSignatureError('step 3')
homekit.exceptions.InvalidSignatureError: step 3
2019-07-20 17:38:58 WARNING (MainThread) [homeassistant.components.template.sensor] Could not render template USD to EUR, the state is unknown.
2019-07-20 17:39:11 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
    raise handshake_exc
  File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:1056)
2019-07-20 17:39:11 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error in data received
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 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:1056)
2019-07-20 17:39:11 ERROR (SyncWorker_7) [homeassistant.components.rest.sensor] Error fetching data: <PreparedRequest [GET]> from http://192.168.0.15:8123/api/config failed with ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2019-07-20 17:39:11 WARNING (MainThread) [homeassistant.components.sensor] Platform rest not ready yet. Retrying in 60 seconds.

I edited your wall of text to use code markup, so people can read it. However, please read the sticky post and edit your post to provide the things in steps 8 onwards.

1 Like

You need to provide more info, for starters:

  • the OS you are running
  • the version of Hass you are running
  • are you running in a venv or running a Docker image
  • how did you upgrade python and to what version exactly?

OS: linux raspbian virtual machine
Version: latest one 0.82.2
venv
python 3.7.3

thanks very much