C2N14 / AutomaThemely

Simple, set-and-forget python application for changing between desktop themes according to light and dark hours
GNU General Public License v3.0
205 stars 31 forks source link

ImportError: cannot import name 'Location' from 'astral' #43

Closed WhyNotHugo closed 4 years ago

WhyNotHugo commented 4 years ago

Running automathemely fails for me:

➜ automathemely
Traceback (most recent call last):
  File "/usr/bin/automathemely", line 11, in <module>
    load_entry_point('AutomaThemely==1.3', 'console_scripts', 'automathemely')()
  File "/usr/lib/python3.8/site-packages/automathemely/bin/run.py", line 29, in main
    from automathemely.autoth_tools import argmanager, extratools, envspecific, updsuntimes
  File "/usr/lib/python3.8/site-packages/automathemely/autoth_tools/updsuntimes.py", line 8, in <module>
    from astral import Location
ImportError: cannot import name 'Location' from 'astral' (/usr/lib/python3.8/site-packages/astral/__init__.py)

Looking at astral's code, it seems that this should probably be from astral.location import Location? This was changed upstream mid-2019.

mjbfm99 commented 4 years ago

I got it to work by changing a few lines, as in #41

AndersonGI commented 4 years ago

I still got this error today, it was changed on master branch?

WhyNotHugo commented 4 years ago

@AndersonGI See #41

Closing this, discussion can carry on there.

AndersonGI commented 4 years ago

Ok. Probably you guys already thought of using geoclue istead of this one, but if not yet, here it comes a suggestion.