Satnogs-auto-scheduler Issues

Hi. I’m running into a few issues with Auto-Scheduler, can folks have a quick look and give me a few pointers.

Thanks
Karl.

pi@satnogs2009:~ $ systemctl status satnogs-auto-scheduler.service
● satnogs-auto-scheduler.service - Schedule SatNOGS observations for 1.2h on station 2009
Loaded: loaded (/etc/systemd/system/satnogs-auto-scheduler.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-08-30 14:36:03 MDT; 4s ago
Process: 5880 ExecStart=/home/pi/env/bin/python /home/pi/satnogs-auto-scheduler/schedule_single_station.py -s 2009 -d 0.5 -r 20 -m 20 -P /home/pi/priorities_2009.txt (code=exited, status=1/FAILURE)
Main PID: 5880 (code=exited, status=1/FAILURE)

Aug 30 14:36:03 satnogs2009 systemd[1]: Starting Schedule SatNOGS observations for 1.2h on station 2009…
Aug 30 14:36:03 satnogs2009 python[5880]: Traceback (most recent call last):
Aug 30 14:36:03 satnogs2009 python[5880]: File “/home/pi/satnogs-auto-scheduler/schedule_single_station.py”, line 10, in
Aug 30 14:36:03 satnogs2009 python[5880]: from tqdm import tqdm
Aug 30 14:36:03 satnogs2009 python[5880]: ModuleNotFoundError: No module named ‘tqdm’
Aug 30 14:36:03 satnogs2009 systemd[1]: satnogs-auto-scheduler.service: Main process exited, code=exited, status=1/FAILURE
Aug 30 14:36:03 satnogs2009 systemd[1]: satnogs-auto-scheduler.service: Failed with result ‘exit-code’.
Aug 30 14:36:03 satnogs2009 systemd[1]: Failed to start Schedule SatNOGS observations for 1.2h on station 2009.

Have you just installed satnogs-auto-scheduler, or did it work previously?

If you just install it, did you really run all of these?

cd satnogs-auto-scheduler
virtualenv -p python3 env
source env/bin/activate
pip install .
$ ./schedule_single_station.py --version

If you did, what was the output of pip install . and $ ./schedule_single_station.py --version?

Did you perform the installation as the same user as specified in /etc/systemd/system/satnogs-auto-scheduler.service (user is pi in README.md · master · librespacefoundation / SatNOGS / satnogs-auto-scheduler · GitLab )

Perhaps re-run the pip install ., may be updated dependency after a git pull ?

I Followed the instructions to the T and I’m a huge advocate of the RTFM rule. I have two stations at the same location so i might be better off just cloning the one that works and using that image.
Thanks for the reply.

pi@satnogs2009:~ $ cd satnogs-auto-scheduler
pi@satnogs2009:~/satnogs-auto-scheduler $ virtualenv -p python3 env
Already using interpreter /usr/bin/python3
Using base prefix ‘/usr’
New python executable in /home/pi/satnogs-auto-scheduler/env/bin/python3
Not overwriting existing python script /home/pi/satnogs-auto-scheduler/env/bin/python (you must use /home/pi/satnogs-auto-scheduler/env/bin/python3)
Installing setuptools, pip, wheel…done.
pi@satnogs2009:~/satnogs-auto-scheduler $ source env/bin/activate
(env) pi@satnogs2009:~/satnogs-auto-scheduler $ pip install .
Looking in indexes: Simple index, https://www.piwheels.org/simple
Processing /home/pi/satnogs-auto-scheduler
Preparing metadata (setup.py) … done
Requirement already satisfied: requests~=2.25.0 in ./env/lib/python3.7/site-packages (from satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (2.25.1)
Requirement already satisfied: tqdm~=4.43.0 in ./env/lib/python3.7/site-packages (from satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (4.43.0)
Requirement already satisfied: python-decouple~=3.3 in ./env/lib/python3.7/site-packages (from satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (3.6)
Requirement already satisfied: satellitetle~=0.11.0 in ./env/lib/python3.7/site-packages (from satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (0.11.1)
Requirement already satisfied: ephem~=3.7.7.1 in ./env/lib/python3.7/site-packages (from satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (3.7.7.1)
Requirement already satisfied: certifi>=2017.4.17 in ./env/lib/python3.7/site-packages (from requests~=2.25.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (2021.10.8)
Requirement already satisfied: idna<3,>=2.5 in ./env/lib/python3.7/site-packages (from requests~=2.25.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in ./env/lib/python3.7/site-packages (from requests~=2.25.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (4.0.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./env/lib/python3.7/site-packages (from requests~=2.25.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (1.26.9)
Requirement already satisfied: sgp4~=2.18 in ./env/lib/python3.7/site-packages (from satellitetle~=0.11.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (2.21)
Requirement already satisfied: spacetrack~=0.16.0 in ./env/lib/python3.7/site-packages (from satellitetle~=0.11.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (0.16.0)
Requirement already satisfied: rush in ./env/lib/python3.7/site-packages (from spacetrack~=0.16.0->satellitetle~=0.11.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (2021.4.0)
Requirement already satisfied: logbook>=0.12.3 in ./env/lib/python3.7/site-packages (from spacetrack~=0.16.0->satellitetle~=0.11.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (1.5.3)
Requirement already satisfied: python-dateutil in ./env/lib/python3.7/site-packages (from spacetrack~=0.16.0->satellitetle~=0.11.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (2.8.2)
Requirement already satisfied: represent>=1.4.0 in ./env/lib/python3.7/site-packages (from spacetrack~=0.16.0->satellitetle~=0.11.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (1.6.0.post0)
Requirement already satisfied: six>=1.8.0 in ./env/lib/python3.7/site-packages (from represent>=1.4.0->spacetrack~=0.16.0->satellitetle~=0.11.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (1.16.0)
Requirement already satisfied: attrs>=18.1.0 in ./env/lib/python3.7/site-packages (from rush->spacetrack~=0.16.0->satellitetle~=0.11.0->satnogs-auto-scheduler==0+untagged.187.g2a801c6.dirty) (21.4.0)
Building wheels for collected packages: satnogs-auto-scheduler
Building wheel for satnogs-auto-scheduler (setup.py) … done
Created wheel for satnogs-auto-scheduler: filename=satnogs_auto_scheduler-0+untagged.187.g2a801c6.dirty-py3-none-any.whl size=25631 sha256=76142e234a93fc1b75ffb7bc9a334e0a4af2e7e9052f5cc1bebdfdf2b2a4c9e1
Stored in directory: /home/pi/.cache/pip/wheels/a3/22/44/0dcbaecc7809fc610427a6ca3b418bc2292961c7a3181ff729
Successfully built satnogs-auto-scheduler
Installing collected packages: satnogs-auto-scheduler
Attempting uninstall: satnogs-auto-scheduler
Found existing installation: satnogs-auto-scheduler 0+untagged.187.g2a801c6.dirty
Uninstalling satnogs-auto-scheduler-0+untagged.187.g2a801c6.dirty:
Successfully uninstalled satnogs-auto-scheduler-0+untagged.187.g2a801c6.dirty
Successfully installed satnogs-auto-scheduler-0+untagged.187.g2a801c6.dirty
(env) pi@satnogs2009:~/satnogs-auto-scheduler $

After i reboot i get this ?? But before i reboot it appears to be correctly installed.

pi@satnogs2009:~/satnogs-auto-scheduler $ ./schedule_single_station.py --version
Traceback (most recent call last):
File “./schedule_single_station.py”, line 12, in
import auto_scheduler.settings as settings
File “/home/pi/satnogs-auto-scheduler/auto_scheduler/settings.py”, line 4, in
from decouple import config
ImportError: cannot import name ‘config’ from ‘decouple’ (/usr/local/lib/python3.7/dist-packages/decouple/init.py)
pi@satnogs2009:~/satnogs-auto-scheduler $

1 Like

[Unit]
Description=Schedule SatNOGS observations for 1.2h on station 2009

[Service]
Type=oneshot
ExecStart=/home/pi/env/bin/python /home/pi/satnogs-auto-scheduler/schedule_single_station.py -s 2009 -d 0.5 -r 20 -m 20 -P /home/pi/priorities_2009.txt
User=pi

Sorry, it all looks good to me :frowning: Maybe the problem is related to the python env stuff, but I don’t know how it is supposed to work. Hopefully someone else can chip in.

The tqdm package on my system is here:

satnogs-auto-scheduler/env/lib/python3.7/site-packages/tqdm/_tqdm.py

So if it can’t find that, it points to your python environment not being read correctly.

In your other output, there is this:

 Not overwriting existing python script /home/pi/satnogs-auto-scheduler/env/bin/python (you must use /home/pi/satnogs-auto-scheduler/env/bin/python3)

Perhaps you should remove and re-create your virtual environment and try to run the script manually “by hand” instead of in the crontab. So go to your satnogs-auto-scheduler directory and run something like this:

rm -rf env
virtualenv -p python3 env
source env/bin/activate
pip install .
1 Like