Fatal error while loading config: 'packages'

I’m getting this error on Hassio with HA 0.70.1 after a config change, any ideas?

Testing configuration at /config
ERROR:homeassistant.scripts.check_config:BURB
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 207, in check
    res['components'] = check_ha_config_file(hass)
  File "/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 328, in check_ha_config_file
    del core_config[CONF_PACKAGES]
KeyError: 'packages'
Fatal error while loading config: 'packages'
Failed config
  General Errors: 
    - 'packages'
Successful config (partial)

I’m not sure if it’s related, but I had some issues when a package had its own automations and the automation file for the automation editor was empty. I solved this by adding a dummy automation.

Could be related as I’ve been experimenting with automations, but the files are present and have content

This error is usually caused by a problem with a customize/customize_glob entry or a whitelist_external_dirs entry.

Hope this helps.

2 Likes

Thanks, a spent few days debugging!

In my case it was related to whitelist_external_dirs. What is the issue there, do you know?

whitelist_external_dirs:

  • ‘/share/camera’

I have the same error, but as far as i can tell the directory exists (for instance, shapshots can save there)

FWIW. I also get this error message when trying to restart HA, and I too have a white listed directory for my camera snapshots.

  whitelist_external_dirs:
    - /share/snapshots    

Everything works in HA but for getting this message like the OP. To restart HA after config updates I have to power cycle the RPi. For me I first got these ‘package’ error messages four or five HA updates ago. Been ignoring them ever since.

Same issue. If i include the following snippet, I can’t restart with the above error. Remove it, and everything is fine. This is with or without the single quotes. The path exists, as I’m saving snapshots to it with no problem.

whitelist_external_dirs: - '/share/cameras/'

@blackgold9 did you solve the issue? if yes how?

I don’t understand why not much is done or posted about this issue, and since HA 0.75.0 I can’t even use the whitelist dir’s even if I power cycle the RPi now. Loading HA service just hangs until I go into config via SAMBA and remove the whitelist dir.
So my security cameras are effectively down now for pushing realtime images, until whitelisting works again or somebody can fill us in on the tiny bit of information not being said anywhere.
Somebody must know what’s going on for some of us using a whitelist…