Core: [http]: None is not file for dictionary value @ data['http']['ssl_certificate']

Created on 20 Feb 2018  路  9Comments  路  Source: home-assistant/core

Home Assistant release (hass --version):
0.63.3

Python release (python3 --version):
3.5.2

Component/platform:
http

Description of problem:
2018-02-20 08:44:00 ERROR (MainThread) [homeassistant.config] Invalid config for [http]: None is not file for dictionary value @ data['http']['ssl_certificate']. Got None
None is not file for dictionary value @ data['http']['ssl_key']. Got None. (See /opt/homeassistant/configuration.yaml, line 26). Please check the docs at https://home-assistant.io/components/http/

Expected:
regular startup

Problem-relevant configuration.yaml entries and steps to reproduce:

  http:
    api_password: !secret api_password
    base_url: !secret host_ip
    server_port: 8123
    ip_ban_enabled: true
    login_attempts_threshold: 5

Additional info:
I just updated ha version from 0.63.2 to 0.63.3 before those error appeared.
There was never an ssl_key or ssl_certificate configured in my configuration.yaml.
I am running an nginx infront of home-assistant, where my certs are configured.

See attached, my complete configuration.yaml
configuration.txt

Most helpful comment

So I do not use app daemon, but you led me to try reinstalling HASS, which fixed it. I then traced the problem to a newer voluptuous.

This should fix it for the rest of you:
pip install voluptuous==0.10.5

As of this writing, that is the version required by HASS, but I had done a blanket pip upgrade and got 0.11.1.

All 9 comments

Info:
Downgrade to version 0.63.2 solved this issue. home-assistant is starting up again.
But this should not be the end solution.

Seeing a similar issue with other components that seem to need defaults to be explicitly set.

Similarly, I cannot pass config vailidation without api_password and login_attempts_threshold set. I am on 0.62.1.
I am using nginx in front of HASS and do not want to set either.

(home-assistant) ~/home-assistant/config$ hass --script check_config 2>&1
Testing configuration at /home/hass/.homeassistant
# ...
2018-02-20 11:31:25 ERROR (MainThread) [homeassistant.config] Invalid config for [http]: string value is None for dictionary value @ data['http']['api_password']. Got None
value must be at least 0 for dictionary value @ data['http']['login_attempts_threshold']. Got None. (See /home/hass/.homeassistant/configuration.yaml, line 38). Please check the docs at https://home-assistant.io/components/http/
2018-02-20 11:31:25 ERROR (MainThread) [homeassistant.setup] Setup failed for http: Invalid config.
http:
  server_port: 8123
  ssl_certificate: !secret http_ssl_certificate
  ssl_key: !secret http_ssl_key
  cors_allowed_origins: !include cors.yaml
  use_x_forwarded_for: true
  trusted_networks:
    - 10.0.1.0/24
    - 127.0.0.1
    - ::1

I just ran into the same thing, although not immediately after an upgrade to HASS. It happened after I installed the new AppDaemon beta. If you guys also recently did that, I can confirm that downgrading to 63.2, then reinstalling 63.3 fixes it.

I think there is a mix-match of dependencies that caused the error. Reinstalling HASS after AppDaemon seems to work around the problem. I haven't gone through all of the logs yet to see exactly which package caused the issue, but it's working for me. HTH.

So I do not use app daemon, but you led me to try reinstalling HASS, which fixed it. I then traced the problem to a newer voluptuous.

This should fix it for the rest of you:
pip install voluptuous==0.10.5

As of this writing, that is the version required by HASS, but I had done a blanket pip upgrade and got 0.11.1.

Note- previous applies to 0.62.1 and I did not check with 0.63.x

@xehn you made my day. Thats it. Never thought of issues with appdaemon, but yes. I first updated appdaemon and after that homeassistant, which lead to the startup issue.

After downgrading hass to 0.63.2 and another upgrade to 0.63.3, everythings is fine.
Strange.
Dont know if this issue can be closed because of this or if there have to be any more debugging.

Since this seems to be a configuration issue, rather than an actual bug, I think closing it would be prudent.

While this was inconvenient, Home Assistant isn't really doing anything wrong here. It has clearly labeled dependencies, which we all carelessly replaced. A hook could be added to check that sort of thing, but it really isn't a HASS problem so much as an end user one.

The "right" fix would probably be running HASS, AD, and potentially anything else on the system in separate virtual containers (through virtualenv, docker, or other similar method). The complexity of managing dependencies is one of the primary reasons those programs exist, after all.

Glad you two got it going. Hopefully this thread will help anyone else who has a similar problem!

@chennin same here got this error too until I reverted voluptuous==0.10.5.

Since #12463 voluptuous was updated to 0.11.1. It breaks config validation if default values are invalid (i.e. set to None).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kdschlosser picture kdschlosser  路  374Comments

ariel-madril picture ariel-madril  路  451Comments

abouelric picture abouelric  路  165Comments

neotrunks picture neotrunks  路  169Comments

McGiverGim picture McGiverGim  路  124Comments