Noob - can't the hello world app to run properly

debian@beaglebone:/home/homeassistant/conf/apps$ sudo appdaemon -c /home/homeassistant/conf
2017-11-18 13:13:46.124649 INFO AppDaemon Version 2.1.12 starting
2017-11-18 13:13:46.128486 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2017-11-18 07:13:46.592451 INFO Starting Apps
2017-11-18 07:13:46.860236 INFO Got initial state
2017-11-18 07:13:46.865738 INFO Loading Module: /home/homeassistant/conf/apps/hello.py
2017-11-18 07:13:46.872621 INFO Loading Object hello_world using class HelloWorld from module hello
2017-11-18 07:13:46.875206 WARNING ------------------------------------------------------------
2017-11-18 07:13:46.877349 WARNING Unexpected error during loading of hello_world:
2017-11-18 07:13:46.879443 WARNING ------------------------------------------------------------
2017-11-18 07:13:46.886865 WARNING Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/appdaemon/appdaemon.py”, line 912, in read_app
init_object(name, class_name, module_name, conf.app_config[name])
File “/usr/local/lib/python3.5/dist-packages/appdaemon/appdaemon.py”, line 573, in init_object
app_class = getattr(module, class_name)
AttributeError: module ‘hello’ has no attribute ‘HelloWorld’

2017-11-18 07:13:46.890271 WARNING ------------------------------------------------------------
2017-11-18 07:13:46.892252 INFO App initialization complete
2017-11-18 07:13:46.895419 INFO Starting dashboard
2017-11-18 07:13:46.935368 INFO API is disabled
2017-11-18 07:13:47.005808 INFO Connected to Home Assistant 0.56.1
2017-11-18 07:13:48.002747 WARNING Scheduler clock skew detected - delta = 1.002608060836792 - resetting
2017-11-18 07:13:53.379079 INFO New dashboard connected: Main

appdaemon.yaml

AppDaemon:
  logfile: STDOUT
  errorfile: STDERR
  threads: 10
HASS:
  ha_url: http://192.168.1.12:8123
  #ha_key: <some key>
HADashboard:
  dash_url: http://192.168.1.12:5050


#Apps
#hello_world:
#  module: hello
#  class: HelloWorld

apps.yaml

hello_world:
  module: hello
  class: HelloWorld

hello.py

import appdaemon.appapi as appapi

#
# Hello World App
#
#Args:
#

class HelloWord(appapi.AppDaemon):

  def initialize(self):
     self.log("Hello from AppDaemon")
     self.log("You are now ready to run Apps!")

Please help, I’m trying to learn

Python and yaml are both very dependent on indentation, so no-one can really read them in a post until you use the code blocks and syntax highlighting tools linked to in the blue box at the top of the page.

you run appdaemon version 2.1.12
so your apps should not be in appdaemon.yaml but in a seperate file called apps.yaml

I’m having trouble figuring out the mark up to post the code. I tried using the ‘’’ but it seemed to have no effect

I have the same error when I removed the app from appdaemon.yaml and left it in apps.yaml

Figured it out. The above code is accurate as of now

it seems that you use ’ + "
you need to use ` 3 times

i see your error.
in your hello.py you have a typo in the classname!
you are missing an L

1 Like

I don’t see the error. Could you point out how I have it spelled vs how it should be spelled, please?

You wrote

class HelloWord(appapi.AppDaemon):

should be

class HelloWorld(appapi.AppDaemon):
1 Like

Thank you!!!