Issues running AppDaemon on Hassbian: TypeError: argument of type 'NoneType' is not iterable

  File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/admain.py", line 186, in main
    if "secrets" in config:
TypeError: argument of type 'NoneType' is not iterable

Installed using sudo hassbian-config install appdaemon running on Hassbian. This created another virtual env, appdaemon, in addition to homeassistant for the home homeassistant user.

My appdaemon.yaml file is in /home/homeassistant/appdaemon:

appdaemon:
      logfile: STDOUT
      errorfile: STDERR
      threads: 10
      app_dir: /home/appdaemon/appdaemon/apps
      plugins:
        HASS:
          type: hass
          ha_url: http://xxxxxx:8123
          ha_key: xxxx
        HADashboard:
          dash_url: http://xxxxxxx:5050
          dash_dir: /home/homeassistant/appdaemon/dashboards

I’m trying to run it in the appdaemon venv as homeassistant:

appdaemon -c /home/homeassistant/appdaemon/

Full output is:
INFO AppDaemon Version 3.0.2 starting

INFO Configuration read from: /home/homeassistant/appdaemon/appdaemon.yaml

INFO AppDaemon: Starting Apps

WARNING config_dir: /home exists, but is not writeable, owner: root

WARNING appdir: /home/appdaemon does not exist exist

WARNING appdir: /home/appdaemon/appdaemon does not exist exist

WARNING appdir: /home/appdaemon/appdaemon/apps does not exist exist

INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin

INFO AppDaemon: HASS: HASS Plugin Initializing

WARNING AppDaemon: HASS: ha_key is deprecated please use HASS Long Lived Tokens instead

INFO AppDaemon: HASS: HASS Plugin initialization complete

 ------------------------------------------------------------

WARNING Unexpected error during run()

WARNING ------------------------------------------------------------

WARNING Traceback (most recent call last):

File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/admain.py", line 76, in run

self.AD = ad.AppDaemon(self.logger, self.error, self.diag, loop, **appdaemon)

File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/appdaemon.py", line 279, in __init__

basename = self.plugins[name]["type"]

KeyError: 'type'

WARNING ------------------------------------------------------------

INFO AppDeamon Exited

What is going on?

This should be a long-lived access token:

token: xxx

And this should be in lower case:

hadashboard:
  dash_url: http://192.168.1.20:5050

But not sure if this is the cause of your error.

log:
  logfile: STDOUT
  errorfile: STDERR
  
appdaemon:
  threads: 10
  app_dir: /home/appdaemon/appdaemon/apps
  plugins:
    hass:
      type: hass
      ha_url: http://x:8123
      ha_key: x
      token: x
    hadashboard:
      dash_url: http://x:5050
      dash_dir: /home/homeassistant/appdaemon/dashboards

Changed to lower case, changed ‘HASS:’ to lower case too. Also, token was a long lived access token.

Thanks for your suggestions…but still getting error (same)

HASS should actually be upper case. Please post the new error log so we can try to help.

Paths were wrong…(ughhh) /home/homeassistant/appdaemon NOT(/home/appdaemon)!

Thanks for the help!