I’m noticing that both of my stations are occasionally failing to schedule observations. If I go in manually and run the “schedule_single.station.py” manually - it generally runs just fine. However this morning I got the following error (resulting in no passes scheduled). Could this be why my autoschedulers are occasionally failing? Any advice? (sorry for poor screen cap - done via VNC from work on my cell phone)
Mine are also failing now and then.
I think its the same error, here is what I am seeing when they fail.
python2 /home/pi/satnogs-auto-scheduler/schedule_single_station.py -s 908 -r 5 -m 20
2020-02-04 17:53:05,945 - root - INFO - Requesting information for ground station 908
2020-02-04 17:53:07,472 - root - INFO - Ground station information retrieved!
2020-02-04 17:53:07,474 - root - INFO - Updating transmitters and TLEs for station
2020-02-04 17:53:07,476 - root - INFO - Fetching transmitter information from DB.
2020-02-04 17:53:11,473 - root - INFO - Transmitters received!
2020-02-04 17:53:11,613 - root - INFO - Transmitters filtered based on ground station capability.
2020-02-04 17:53:11,615 - root - INFO - Fetching satellite information from DB.
2020-02-04 17:53:13,249 - root - INFO - Satellites received!
2020-02-04 17:53:13,303 - root - INFO - Requesting transmitter success rates.
2020-02-04 17:53:52,466 - root - INFO - Transmitter success rates received!
2020-02-04 17:53:52,467 - root - INFO - Fetch from http://mstl.atl.calpoly.edu/~ops/keps/kepler.txt
2020-02-04 17:53:52,730 - root - INFO - Fetch from https://www.amsat.org/amsat/ftp/keps/current/nasabare.txt
Traceback (most recent call last):
File "/home/pi/satnogs-auto-scheduler/schedule_single_station.py", line 395, in <module>
main()
File "/home/pi/satnogs-auto-scheduler/schedule_single_station.py", line 246, in main
tles = fetch_tles(norad_cat_ids)
File "/usr/local/lib/python2.7/dist-packages/satellite_tle/fetch_tles.py", line 53, in fetch_tles
new_tles = fetch_tles_from_url(url=url, verify=verify)
File "/usr/local/lib/python2.7/dist-packages/satellite_tle/fetch_tle.py", line 90, in fetch_tles_from_url
if (lines[i + 1][0] == "1") & (lines[i + 2][0] == "2"):
IndexError: string index out of range
Hmm. Something wrong with the AMSAT TLE server? I just looked at nasabare.txt and it looks ok to me…
Occasionally the AMSAT TLE file contains a trailing newline which triggers this bug: python-satellitetle#12. It’s fixed in python-satellitetle version 0.8.1 and newer (see the Changelog).
To update the python-satellitetle module to the newest bugfix release of 0.8, run one of the following commands (if you are using a virtualenv, make sure to activate it first):
pip install --upgrade satellitetle~=0.8.0
# or
pip3 install --upgrade satellitetle~=0.8.0
edit: Fixed commands (missing upgrade
argument, thanks @KD9KCK for pointing this out!)
I have also learned that TLE from the JOBs api sometimes have extra spaces.
on both of my stations:
Usage:
pip[3] <command> [options]
no such option: --upgrade
the [3] was just added by me to indicate that both give the same result.
pip install --upgrade satellitetle~=0.8.0
Need to have isntall before --upgrade
Indeed, thanks! I just edited my post to show the correct commands.
(I shouldn’t have skipped the testing on my machine before posting)
Thanks! I’ll implement this upgrade later today.
[edit]
Ok, tried it on station 187 (pip, no virtualenv), and it worked no problem.
Tried it on station 272 (pip3 w/virtualenv), and got this:
>>> pip install --upgrade satellitetle~=0.8.0
File "<stdin>", line 1
pip install --upgrade satellitetle~=0.8.0
^
Notes: in virtualenv, I tried sudo or no sudo, pip and pip3 - all give the same error (although using pip gives the ^ under the second “p”). I tried sudo pip3 install --upgrade satellitetle~=0.8.0
outside the virtualenv and it seemed to work (although who knows if it will affect the autoscheduler as that is definately running in the virtualenv).