Auto-scheduler Setup Tool (was: Error: Invalid token header)

Continuing the discussion from Auto-scheduler Error: Invalid token header:


I just created a command-line tool to help with the setup of the SatNOGS auto-scheduler. Maybe you’d like to check it out. It’s not released yet, but maybe you’d like to test the current development version.

To do so, change into the directory where you installed auto-scheduler, then activate the python virtual environment and run pip install to update:

cd auto-scheduler
source "env/bin/activate"
pip install git+

Then run the auto-scheduler setup tool like this:

Initializing SatNOGS auto-scheduler config...

==== DB API Token ====
Login to and click on your profile picture 
in the top right corner to get to 'Settings / API Token'. 

Please enter your API Token for SatNOGS DB: 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b

==== Network API Token ====
Log in to and click on the user icon at 
the top right corner and then click on the "Dashboard" option. 
On the top of the dashboard page right under the user icon click the 
button 'API key' to show your API token. 

Please enter your API Token for SatNOG Network: 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Configuration has been successfully written to: /tmp/test/.env`

(the tokens above are just an example)

I hope this helps, let me know if it works and if there is anything to improve.


Thanks Kerel for the tool, it has proven and works correctly to generate the .env file.
In my case, that wasn’t the problem, since I had it generated correctly and gave me the same error.
I found that it was an installation problem, although it seems to require that it be installed on the /satnogs-auto-scheduler carpet, but that carpet does not work due to the problem you mentioned.
In the current Gitlab instruction it does not mention it on the carpet, in the previous version it was missing.
Could this have been the problem?
Thank you!

1 Like

ok, happy to hear that the content of your configuration file is correct.
Is the auto-scheduler working for you now?
If not, I just released auto-scheduler version 0.3. To update, enter the virtual environment, then run

pip install git+

I don’t quite understand your message, what do you mean by “carpet”?

Sorry for the error description, I was checking better and I found that the auto-scheduler works, but it requires that before executing the script “”, I need to first execute “source env/bin/activate”, otherwise it does not find some libraries.
I hope my explanation is clearer now.
What changes does version 0.3 have?

ah, I think I understand the description now, thanks!

The changes with a longer description can be found in the Changelog, e.g. improved caching strategy when using the auto-scheduler for more then one station and allowed scheduling of satellites with temporary NORAD ID.

But depending on your installation method you might have had a newer version than 0.2 installed already, so the changes might not be new for you.

1 Like

Thank you very much for the explanation, for now it is working correctly with the modification mentioned in the previous post.

I leave here what the execution is like in my script that executes the Cron:

cd /home/pi/satnogs-auto-scheduler
source env/bin/activate
python3 /home/pi/satnogs-auto-scheduler/ -s ${STATION_ID} -d ${TIMESCHEDULE} -P ${PRIO_FILE} -M ${MINPRIORITY}