Hello,
I have still error AttributeError: module ‘astral’ has no attribute ‘Location’. What does it mean? Thank you.
Hello,
I have still error AttributeError: module ‘astral’ has no attribute ‘Location’. What does it mean? Thank you.
please post your appdaemon.yaml
configuration so we can have a look.
I created virtual environment:
cd /home/pi
sudo mkdir appdaemon2
cd ./appdaemon2
python3 -m venv .
In activated the virtual environment:
python3 -m pip install wheel
python3 -m pip install appdaemon
Folder structure in virtual environment appdaemon2:
Folder structure in virtual environment conf:
In /etc/systemd/system/[email protected] (I created [email protected] for startup)
Description=AppDaemon
[email protected]
[email protected]
[Service]
Type=simple
User=%i
ExecStart=/home/pi/appdaemon2/bin/appdaemon -c "/home/%i/appdaemon2/conf"
[Install]
WantedBy=multi-user.target
I need active status in appdaeamon.
What is required configure in appdaemon.yaml for active status? Is required configuration of hadashboard, http, admin, api? I have row with=> token: xxxxx in secrets.yaml
My appdaemon.yaml (XXX.XX.XXX.XXX => I have real IP adres):
Error in log:
(appdaemon2) pi@raspberrypi:~/appdaemon2/conf $ tail -f /home/pi/appdaemon2/conf/logs/appdaemon.log
self.AD = ad.AppDaemon(self.logging, loop, **appdaemon)
File "/home/pi/appdaemon2/lib/python3.7/site-packages/appdaemon/appdaemon.py", line 188, in __init__
self.sched = scheduler.Scheduler(self)
File "/home/pi/appdaemon2/lib/python3.7/site-packages/appdaemon/scheduler.py", line 54, in __init__
self.init_sun()
File "/home/pi/appdaemon2/lib/python3.7/site-packages/appdaemon/scheduler.py", line 187, in init_sun
self.location = astral.Location((
AttributeError: module 'astral' has no attribute 'Location'
2020-02-14 13:05:51.366489 INFO AppDaemon: Previous message repeated 1 times
2020-02-14 13:05:51.366777 INFO AppDaemon: AppDaemon Exited
Thank you
With appdaemon 3.0.1 it is OK, but problem with Error in authentication from appdaemon to HA.
same here:
sudo pip3 install appdaemon
...
2020-02-16 01:17:54.996889 INFO AppDaemon: AppDaemon Version 4.0.1 starting
2020-02-16 01:17:54.997721 INFO AppDaemon: Python version is 3.7.3
Configuration read from: /home/homeassistant/appdaemon/appdaemon.yaml
...
AttributeError: module 'astral' has no attribute 'Location'
even for minimal configuration
appdaemon:
time_zone: Europe/Berlin
latitude: 12.345
longitude: 12.345
elevation: 1
Solution:
In virtual environment: uninstall astral and install astral version 1.10.1
The issue appears to be that the current appdaemon master branch has a non-versioned requirement of ‘astral’. See requirements.txt. Astral on Feb 10 released 2.x which auto-upgrades appdaemon builds. Unfortunately the new version has renamed one of its APIs breaking appdaemon.
The fix, for now, is:
Or wait for a new release of appdaemon where this should be fixed.