Auto scheduling : string index out of range in fetch_tle.py script

Darn … just got this error from my auto scheduler : “IndexError: string index out of range”

this is the output of my scheduler execution (I removed the timestamps) :

root - INFO - Requesting information for ground station
root - INFO - Ground station information retrieved!
root - INFO - Updating transmitters and TLEs for station
root - INFO - Fetching transmitter information from DB.
root - INFO - Transmitters received!
root - INFO - Transmitters filtered based on ground station capability.
root - INFO - Fetching satellite information from DB.
root - INFO - Satellites received!
root - INFO - Requesting transmitter success rates.
root - INFO - Transmitter success rates received!
root - INFO - Fetch from http://mstl.atl.calpoly.edu/~ops/keps/kepler.txt
root - INFO - Fetch from https://www.amsat.org/amsat/ftp/keps/current/nasabare.txt
Traceback (most recent call last):
File “./schedule_single_station.py”, line 292, in
main()
File “./schedule_single_station.py”, line 163, in main
cache.update()
File “/usr/local/bin/satnogs-auto-scheduler_901/cache.py”, line 106, in update
tles = fetch_tles(norad_cat_ids)
File “build/bdist.linux-armv7l/egg/satellite_tle/fetch_tles.py”, line 53, in fetch_tles
File “build/bdist.linux-armv7l/egg/satellite_tle/fetch_tle.py”, line 90, in fetch_tles_from_url
IndexError: string index out of range

the error value is 1

Is this error coming from the TLEs that are fetched ?

1 Like

Yes, this is caused by a trailing newline in the AMSAT TLE source (nasabasare.txt), breaking the parser in satellitetle (a dependency of the auto-scheduler), see also auto-scheduler#12.
It’s fixed in the latest release (v0.8.1, 2019-12-19), so you can fix it on your host by updating satellitetle:

pip install --upgrade satellitetle
2 Likes

@kerel : thank you, working again.

1 Like