AttributeError: 'str' object has no attribute 'get' when parsing logfile

Hi!
I installed the appdaemon and when I start it I get the following:

pi@raspberrypi_wozi:~/appdaemon $ appdaemon -D DEBUG -c conf
Traceback (most recent call last):
  File "/usr/local/bin/appdaemon", line 11, in <module>
    load_entry_point('appdaemon==2.0.0b4', 'console_scripts', 'appdaemon')()
  File "/usr/local/lib/python3.4/dist-packages/appdaemon/appdaemon.py", line 1553, in main
    conf.logfile = config['AppDaemon'].get("logfile")
AttributeError: 'str' object has no attribute 'get'

What can I do about this? Is this an issue with python versions?

Can you post your config file please?


AppDaemon:
  app_dir =
  logfile = '/home/pi/appdaemon/log/appdaemon.log'
  errorfile = STDERR
  threads = 10
  latitude =
  longitude =
  elevation =
  time_zone =

HASS:
  ha_url = http://192.168.1.105:8123
  ha_key = **************


HADashboard:
  dash_url = http://192.168.1.106:5050

The formatting is incorrect for YAML - you need to replace the = with : followed by a space:

AppDaemon:
  app_dir:
  logfile: '/home/pi/appdaemon/log/appdaemon.log'
  errorfile: STDERR
  threads: 10
  latitude:
  longitude:
  elevation:
  time_zone:

HASS:
  ha_url: http://192.168.1.105:8123
  ha_key: **************


HADashboard:
  dash_url: http://192.168.1.106:5050

Oh that was it! Thank you!

1 Like