2024-04-16, 07:44 PM
Not sure if this is directly related, but pypilot is exiting after a while on my RPI. After it exits, I check gpsd status with cgps, and it appears that the gps is still running and gpsd does not have any errors.
Is there a way to force pypilot to retry if it gets this error?
sensor lost gps gpsd /dev/ttyACM0 Tue Apr 16 07:07:50 2024
gpsd connected
GPSD devices ['/dev/ttyACM0']
sensor found gps gpsd /dev/ttyACM0 Tue Apr 16 07:07:09 2024
calibration loaded, starting 84952
server/client is running too _slowly_ 0.11605840499396436
signalk process 84960
signalkread token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXZpY2UiOiI3ZjhiYjM3YS0yMjVkLTQxMGItYmJjMC01M2ZkNDgxZTlmNGIiLCJpYXQiOjE3MTExMjczMTB9.ueM0YTOkOKZnNGAwR4LFp8Ft_zVQoNAxuvdgz65lX28
signalk server found 127.0.0.1:3000
signalk found ws://127.0.0.1:3000/signalk/v1/stream?subscribe=none
signalk connected to ws://127.0.0.1:3000/signalk/v1/stream?subscribe=none
sensor lost gps gpsd /dev/ttyACM0 Tue Apr 16 07:07:50 2024
Traceback (most recent call last):
File "/usr/local/bin/pypilot", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.51', 'console_scripts', 'pypilot')())
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 519, in main
ap.iteration()
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 360, in iteration
self.sensors.poll()
File "/usr/local/lib/python3.9/dist-packages/pypilot/sensors.py", line 391, in poll
self.signalk.poll()
File "/usr/local/lib/python3.9/dist-packages/pypilot/signalk.py", line 327, in poll
self.sensors.write(sensor, data, 'signalk')
File "/usr/local/lib/python3.9/dist-packages/pypilot/sensors.py", line 418, in write
self.sensors[sensor].write(data, source)
File "/usr/local/lib/python3.9/dist-packages/pypilot/sensors.py", line 45, in write
if not self.update(data):
File "/usr/local/lib/python3.9/dist-packages/pypilot/sensors.py", line 219, in update
self.speed.set(data['speed'])
KeyError: 'speed'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 27, in poll
pid, sts = os.waitpid(self.pid, flag)
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 193, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt
Is there a way to force pypilot to retry if it gets this error?
sensor lost gps gpsd /dev/ttyACM0 Tue Apr 16 07:07:50 2024
gpsd connected
GPSD devices ['/dev/ttyACM0']
sensor found gps gpsd /dev/ttyACM0 Tue Apr 16 07:07:09 2024
calibration loaded, starting 84952
server/client is running too _slowly_ 0.11605840499396436
signalk process 84960
signalkread token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXZpY2UiOiI3ZjhiYjM3YS0yMjVkLTQxMGItYmJjMC01M2ZkNDgxZTlmNGIiLCJpYXQiOjE3MTExMjczMTB9.ueM0YTOkOKZnNGAwR4LFp8Ft_zVQoNAxuvdgz65lX28
signalk server found 127.0.0.1:3000
signalk found ws://127.0.0.1:3000/signalk/v1/stream?subscribe=none
signalk connected to ws://127.0.0.1:3000/signalk/v1/stream?subscribe=none
sensor lost gps gpsd /dev/ttyACM0 Tue Apr 16 07:07:50 2024
Traceback (most recent call last):
File "/usr/local/bin/pypilot", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.51', 'console_scripts', 'pypilot')())
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 519, in main
ap.iteration()
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 360, in iteration
self.sensors.poll()
File "/usr/local/lib/python3.9/dist-packages/pypilot/sensors.py", line 391, in poll
self.signalk.poll()
File "/usr/local/lib/python3.9/dist-packages/pypilot/signalk.py", line 327, in poll
self.sensors.write(sensor, data, 'signalk')
File "/usr/local/lib/python3.9/dist-packages/pypilot/sensors.py", line 418, in write
self.sensors[sensor].write(data, source)
File "/usr/local/lib/python3.9/dist-packages/pypilot/sensors.py", line 45, in write
if not self.update(data):
File "/usr/local/lib/python3.9/dist-packages/pypilot/sensors.py", line 219, in update
self.speed.set(data['speed'])
KeyError: 'speed'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 27, in poll
pid, sts = os.waitpid(self.pid, flag)
File "/usr/local/lib/python3.9/dist-packages/pypilot/autopilot.py", line 193, in cleanup
raise KeyboardInterrupt # to get backtrace on all processes
KeyboardInterrupt