Invalid config and unable to restart server

Hi there,

I am fairly new to the world of Home Assistant, just got everything set up on my Raspberry Pi 4 how I wanted it and then have run into a config issue where I am unable to restart my Pi from the frontend. I am seeing this in the logs:

2020-05-17 16:30:05 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall homeassistant.restart (c:912713c2e38847ddb1573d8012b6c4c8)>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1263, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1282, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 272, in async_handle_core_service
    errors = await conf_util.async_check_ha_config_file(hass)
  File "/usr/src/homeassistant/homeassistant/config.py", line 830, in async_check_ha_config_file
    res = await check_config.async_check_ha_config_file(hass)
  File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 177, in async_check_ha_config_file
    p_validated = platform_schema(p_validated)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 208, in __call__
    return self._exec((Schema(val) for val in self.validators), v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 283, in _exec
    v = func(v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
    return schema(data)
  File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 734, in key_value_validator
    f"Unexpected value for {key}: '{key_value}'. Expected {', '.join(value_schemas)}"
TypeError: sequence item 0: expected str instance, NoneType found

I understand the basic error message at the bottom but I’m not sure where to look for the issue. A quick look through my config files doesn’t throw up anything obvious.

Anyone seen this or can point me in the right direction?

Thanks!

If you go to configuration -> server controls -> check configuration, what do you get ?

Just a spinning loading circle. Then the logs show this:

2020-05-17 16:51:16 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 125, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/core.py", line 29, in post
    errors = await async_check_ha_config_file(request.app["hass"])
  File "/usr/src/homeassistant/homeassistant/config.py", line 830, in async_check_ha_config_file
    res = await check_config.async_check_ha_config_file(hass)
  File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 177, in async_check_ha_config_file
    p_validated = platform_schema(p_validated)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 208, in __call__
    return self._exec((Schema(val) for val in self.validators), v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 283, in _exec
    v = func(v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
    return schema(data)
  File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 734, in key_value_validator
    f"Unexpected value for {key}: '{key_value}'. Expected {', '.join(value_schemas)}"
TypeError: sequence item 0: expected str instance, NoneType found
1 Like

I have the same issue since a couple of days/weeks… must be some update that caused this.

Yes, I’m still seeing this too. No idea what is causing it. I’ve found restarting via SSH works