Open ravenomeo opened 4 years ago
I still cant work
Traceback (most recent call last):
File "/usr/bin/automathemely", line 33, in
What version of python do you have and what distro are you running it on?
What version of python do you have and what distro are you running it on?
I am using arch linux
yes Location
has been renamed to LocationInfo
Alright. 👍
Managed to run it on arch after replacing all the location
with Location
in
/usr/lib/python3.8/site-packages/automathemely/autoth_tools/updsuntimes.py
But now I'm getting a sun_times error when running the application from terminal:
File "/usr/lib/python3.8/site-packages/automathemely/bin/run.py", line 96, in main
with open(get_local('sun_times'), 'rb') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/<username>/.config/automathemely/sun_times'
Edit:
Think I got it running now.
In autoth_tools/updsuntimes.py
Location
to location
from astral import LocationInfo
like suggested abovefrom astral.sun import sun
location = Location()
to location = LocationInfo()
sunrise = location.sun()['sunrise'].replace(second=0) + timedelta(minutes=us_se['offset']['sunrise'])
sunset = location.sun()['sunset'].replace(second=0) + timedelta(minutes=us_se['offset']['sunset'])
to
sunrise = sun(location.observer)['sunrise'].replace(second=0) + timedelta(minutes=us_se['offset']['sunrise'])
sunset = sun(location.observer)['sunset'].replace(second=0) + timedelta(minutes=us_se['offset']['sunset'])
Now I got my sun_times in .config folder and my theme changed to the light variant.
Oh, just noticed that the pending PR https://github.com/C2N14/AutomaThemely/pull/41 does exactly the same thing :sweat_smile:
Lol. I'm glad we all got it to work in the end
Managed to run it on arch after replacing all the
location
withLocation
in /usr/lib/python3.8/site-packages/automathemely/autoth_tools/updsuntimes.pyBut now I'm getting a sun_times error when running the application from terminal:
File "/usr/lib/python3.8/site-packages/automathemely/bin/run.py", line 96, in main with open(get_local('sun_times'), 'rb') as file: FileNotFoundError: [Errno 2] No such file or directory: '/home/<username>/.config/automathemely/sun_times'
Edit:
Think I got it running now. In
autoth_tools/updsuntimes.py
* Reverted my previous changes from `Location` to `location` * imported `from astral import LocationInfo` like suggested above * imported `from astral.sun import sun` * changed line 66 `location = Location()` to `location = LocationInfo()` * changed line 76 and 77
sunrise = location.sun()['sunrise'].replace(second=0) + timedelta(minutes=us_se['offset']['sunrise']) sunset = location.sun()['sunset'].replace(second=0) + timedelta(minutes=us_se['offset']['sunset'])
to
sunrise = sun(location.observer)['sunrise'].replace(second=0) + timedelta(minutes=us_se['offset']['sunrise']) sunset = sun(location.observer)['sunset'].replace(second=0) + timedelta(minutes=us_se['offset']['sunset'])
Now I got my sun_times in .config folder and my theme changed to the light variant.
Oh, just noticed that the pending PR #41 does exactly the same thing sweat_smile
I do as you say still dont work.But I install python-gobject(sudo pacman -S python-gobject),Its finally worked.
Unfortunately, I tried doing everything on this page, but alas, nothing worked. AutomaThemely refuses to run. I'm currently on Manjaro (XFCE) 20.1.2. Can an update fix this issue?
I do as you say still dont work.But I install python-gobject(sudo pacman -S python-gobject), Its finally worked.
python3.6 -m pip install --user pygobject
but it also is already installed.Still got the ImportError: cannot import name '_gi'
This is with the replaced file from pull request #41
I'm giving up and subscribing here.
I do as you say still dont work.But I install python-gobject(sudo pacman -S python-gobject), Its finally worked.
* In Ubuntu repos python-gobject seems to be for python 2.7. * There is a package python3-gi which i believe is the python 3 alternative, which is installed by default in Ubuntu 20.04 * I also tried `python3.6 -m pip install --user pygobject` but it also is already installed.
Still got the
ImportError: cannot import name '_gi'
This is with the replaced file from pull request #41 I'm giving up and subscribing here.
You can fix this by changing gi to pgi and installing pgi in your venv. As long as the problem is that it can't find the gi module (you mention '_gi'?). I think this should bypass any need for other packages for gi functionality. Not sure what the pros and cons are with this solution compared to using system dependencies and continue using gi though.
Edit: Just saw the date... I'll leave this here if anyone else stumbles through.
Same here cannot start it
~ >>> automathemely
Traceback (most recent call last):
File "/usr/bin/automathemely", line 33, in <module>
sys.exit(load_entry_point('AutomaThemely==1.3', 'console_scripts', 'automathemely')())
File "/usr/lib/python3.10/site-packages/automathemely/bin/run.py", line 29, in main
from automathemely.autoth_tools import argmanager, extratools, envspecific, updsuntimes
File "/usr/lib/python3.10/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.10/site-packages/astral/__init__.py)
There's a bug in the code. The updsuntimes.py script tries to import Location.py, but the module is saved as "location.py" which gives an importation error. Simply due to Uppercase and Lowercase management(L and l). You can change every instance of Location to location, or you can just rename location.py to Location.py(Don't know if the latter works though.
Edit: So after fixing that in mine, turns out when you run automathemely from terminal, you get a "Module not callable error" from line 66 of updsuntimes.py (location=Location()). I fixed this by changing it to (location=Location.Location()). Hope this helps