astral
astral copied to clipboard
Import Method causes some attributes to work and others not to
I had problems getting all the functions to run. I found that some worked and others didnt depending on the way astral is imported.
Some of errors I received were "module 'astral' has no attribute moon_phase" "type object 'Astral' has no attribute 'location' "
import astral - gets the location attribute to work from astral import Astral - got the moon_phase and most other functions working
To get both, manual location, and moonphase working I had to do both. import astral from astral import Astral ast = Astral()
now both of these will run without errors nyemoon = ast.moon_phase(date=datetime.date(2020,1,1)) location = los_altos = astral.Location(info=("Los Altos", "USA", 37.3681, -122.0975, "US/Pacific",50))