Autoscheduler sporadically misbehaves

Every so often, my autoscheduler refuses to play ball:

Scheduling all unscheduled passes listed above.
Failed to batch-schedule observations.
Traceback (most recent call last):
  File "/home/doctorvenables/scheduler/env/lib/python3.11/site-packages/auto_scheduler/satnogs_client.py", line 325, in schedule_observations_batch
    response.raise_for_status()
  File "/home/doctorvenables/scheduler/env/lib/python3.11/site-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://network.satnogs.org/api/observations/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/doctorvenables/scheduler/env/bin/schedule_single_station.py", line 446, in <module>
    main()
  File "/home/doctorvenables/scheduler/env/bin/schedule_single_station.py", line 287, in main
    schedule_single_station(ground_station_id, wait_time_seconds, min_priority, tmax, tmin,
  File "/home/doctorvenables/scheduler/env/bin/schedule_single_station.py", line 440, in schedule_single_station
    schedule_observations_batch(observations)
  File "/home/doctorvenables/scheduler/env/lib/python3.11/site-packages/auto_scheduler/satnogs_client.py", line 329, in schedule_observations_batch
    handle_batch_scheduling_error(err)
  File "/home/doctorvenables/scheduler/env/lib/python3.11/site-packages/auto_scheduler/satnogs_client.py", line 266, in handle_batch_scheduling_error
    if err.get('detail') == 'Invalid token.'
       ^^^^^^^
AttributeError: 'str' object has no attribute 'get'

It only tends to happen if I put in observations in by hand via the satnogs network website but not exclusively.
Doesn’t matter if I use the -d1 switch or the somewhat more ambitiouss -d24 or not at all.
I don’t have a bad connection (evidently!) just a bit mystified.
Is it me or is it the satnogs network or something else?
Thanks,
Mark

Hi Mark,

In some cases, submitting a scheduling job to SatNOGS Network fails with an error code now that is not properly handled by the auto-scheduler. This bug is fixed in the latest development version of the auto-scheduler (see commit ee5babe), there has not been a release with it yet though.

Thanks, this is a good reminder that a release is necessary! The upcoming version of the auto-scheduler introduces a breaking change with the goal to make installation & updating easier, but I didn’t finish the documentation yet.

I’ll post a follow-up for a pre-release here.

Sincerely,
Fabian

3 Likes

Happy to test that commit to see if my issue goes away. Thanks for reassuring a middle-aged worrier.

4 Likes

Replaced the python file with that in the commit you outlined. Tried it. It worked. No error message.
Thank you!

1 Like