Autoscheduler broken after latest update

Traceback (most recent call last):
  File "/home/pi/autosked/satnogs-auto-scheduler/schedule_single_station.py", line 6, in <module>
    from satellite_tle import fetch_tles
  File "/home/pi/.local/lib/python2.7/site-packages/satellite_tle/__init__.py", line 1, in <module>
    from .fetch_tle import * # noqa
  File "/home/pi/.local/lib/python2.7/site-packages/satellite_tle/fetch_tle.py", line 6, in <module>
    from lxml import html
ImportError: No module named lxml

Any suggestions?

install lxml with pypi?

Thats my best guess.

Did it break after latest update of the autoscheduler or latest update of the satnogs client?

“Latest” is elusive. In a few days latest might be something different from today. Could you post which version you are using?

I haven’t updated autoscheduler, ever (to my knowledge). Essentially what has been happening lately is my stations just stop working. They are shown as “online”, yet observations are auto-vetted as bad as no results are uploaded. I go in and reboot the system, which results in no change. Then I update the client via “update” and “apply” in satnogs-setup, and typically things get back to normal. After upgrading to client 1.4 recently, my station 187 autoscheduler doesn’t work at all, even when I manually run the commands as shown in the OP.

autoscheduler and satnogs-client are two completely independent (code-base wise) projects.

My guess is you have both of them installed in the same system and somehow your python libs got meshed up.
My suggestion: run autoscheduler in a virtualenv

Hi @K3RLD,

the version of satellitetle you are using is outdated (lxml usage was dropped in v0.8.0 with f940b27, >=v0.10.1 is required for the latest version of the auto-scheduler).

I recommend to re-install the auto-scheduler as described in here. Also note that Python 2.7 is not supported.

Happy to hear your results!

Sincerely,
Fabian

PS: I have no idea why it broke now. Maybe something else on the system uninstalled the lxml package? To prevent such issues in the future I recommend to use a virtual environment for the auto-scheduler as described in the installation guide.

2 Likes

Results: I re-installed as per @kerel instructions and it appears that the virtual environment fixed the issue. In looking at my other station (272), it was already running in a virtual environment so I guess that’s why I haven’t had issues with that one.

So provided my crontab commands are clear of typos, i should be back on line. Thanks, all!

–Roy
K3RLD

1 Like

As usual - I jinxed myself. It appears that now neither my 187 station nor my 272 station now both have non-functioning auto-schedulers. Looking at both this morning, there are only 6 or 7 observations scheduled when there should be closer to 30 on each station.

I’ll take a look tonight when I get home from work… :frowning:

ok, this is weird:

pi@satnogs-187:~ $ /home/pi/satnogs-auto-scheduler/env/bin/python /home/pi/satnogs-auto-scheduler/schedule_single_station.py -s 187 -d 47 -P /home/pi/autosked/satnogs-auto-scheduler/priorities_187.txt -f
2020-11-18 21:41:40,069 - auto_scheduler.satnogs_client - INFO - Requesting information for ground station 187
2020-11-18 21:41:40,752 - auto_scheduler.satnogs_client - INFO - Ground station information retrieved!
2020-11-18 21:41:40,758 - root - INFO - Finding all passes for 0 satellites:
0it [00:00, ?it/s]
2020-11-18 21:41:40,793 - auto_scheduler.satnogs_client - INFO - Requesting scheduled passes for ground station 187
2020-11-18 21:41:41,991 - auto_scheduler.satnogs_client - INFO - Scheduled passes for ground station 187 retrieved!
2020-11-18 21:41:42,004 - root - INFO - Found 4 scheduled passes between 2020-11-18 21:51:40 and 2020-11-20 20:51:40 on ground station 187
2020-11-18 21:41:42,005 - root - INFO - 4 passes selected out of 0, 2327 s out of 8998 s at 25.861% efficiency
2020-11-18 21:41:42,006 - root - INFO - GS  | Sch | NORAD | Start time          | End time            |  El | Priority | Transmitter UUID       | Mode       | Satellite name 
2020-11-18 21:41:42,007 - root - INFO - 187 |   Y | 22825 | 2020-11-18T22:19:25 | 2020-11-18T22:29:48 |  67 | 1.000000 | jYtki5mG7PidNmWJVU3D4E |            | 
2020-11-18 21:41:42,007 - root - INFO - 187 |   Y | 40908 | 2020-11-18T22:39:48 | 2020-11-18T22:46:43 |  30 | 1.000000 | q6CVKJirfoUjNzD2A4rxsk |            | 
2020-11-18 21:41:42,008 - root - INFO - 187 |   Y | 99792 | 2020-11-18T23:00:39 | 2020-11-18T23:11:08 |  24 | 1.000000 | XXNshyo8JgJRTsSik6zFCX |            | 
2020-11-18 21:41:42,009 - root - INFO - 187 |   Y | 99793 | 2020-11-19T00:38:23 | 2020-11-19T00:49:23 |  40 | 1.000000 | XfCDuS8fK5v4bGDLcWBjNQ |            | 
2020-11-18 21:41:42,009 - root - INFO - Done.

Where normally the entire autoschedule routine takes a few minutes, this one completed in about 5 seconds with no scheduling of passes.

same with my station 272:

pi@SATNOGS-QFH:~ $ /home/pi/autosked/gitclone/satnogs-auto-scheduler/scheduler_env/bin/python /home/pi/autosked/gitclone/satnogs-auto-scheduler/schedule_single_station.py -s 272 -d 47 -z -P /home/pi/autosked/gitclone/satnogs-auto-scheduler/iss_272.txt -f
2020-11-18 21:46:09,667 - root - INFO - Requesting information for ground station 272
2020-11-18 21:46:10,374 - root - INFO - Ground station information retrieved!
2020-11-18 21:46:10,377 - root - INFO - Finding all passes for 0 satellites:
0it [00:00, ?it/s]
2020-11-18 21:46:10,407 - root - INFO - Requesting scheduled passes for ground station 272
2020-11-18 21:46:11,335 - root - INFO - Scheduled passes for ground station 272 retrieved!
2020-11-18 21:46:11,347 - root - INFO - Found 2 scheduled passes between 2020-11-18 21:56:09 and 2020-11-20 20:56:09 on ground station 272
2020-11-18 21:46:11,348 - root - INFO - 2 passes selected out of 0, 920 s out of 1472 s at 62.500% efficiency
2020-11-18 21:46:11,349 - root - INFO - GS  | Sch | NORAD | Start time          | End time            |  El | Priority | Transmitter UUID       | Mode       | Satellite name 
2020-11-18 21:46:11,349 - root - INFO - 272 |   1 | 40654 | 2020-11-18T22:40:44 | 2020-11-18T22:45:06 |  15 | 1.000000 | FtxHUM8pqr6Ep95RehAouX |            | 
2020-11-18 21:46:11,350 - root - INFO - 272 |   1 | 33591 | 2020-11-18T22:54:18 | 2020-11-18T23:05:16 |  75 | 1.000000 | kE4VaYKpnFmzEquEjKKi8D |            | 
pi@SATNOGS-QFH:~ $

Apparently the list of satellites for which the auto-scheduler should schedule observations is empty (Finding all passes for 0 satellites). Maybe there is an issue with the priorities file?

edit:
Or you might have been hit by satnogs-auto-scheduler#21. This can be checked by examining the TLE & transmitter files in /tmp/cache.

2 Likes

Looks like it worked last night. I’ll let it play out a few nights to see what happens.

1 Like