Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No connection to Gemini generates unintelligible error messages #43

Open
bgottula opened this issue Dec 28, 2019 · 0 comments
Open

No connection to Gemini generates unintelligible error messages #43

bgottula opened this issue Dec 28, 2019 · 0 comments
Assignees

Comments

@bgottula
Copy link
Collaborator

When there is no network connection to Gemini, verbose and generally unhelpful error messages such as below result. Do some basic connectivity testing during construction or find another way to make this less ugly.

(venv) rgottula@nix:~/dev/track$ ./track/align.py --mount-pole-alt=38
Traceback (most recent call last):
  File "/home/rgottula/dev/point/point/gemini_backend.py", line 190, in execute_one_command
    buf_resp = self._sock.recv(self.UDP_RECV_BUF_SIZE)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./track/align.py", line 364, in <module>
    main()
  File "./track/align.py", line 211, in main
    mount = track.LosmandyGeminiMount(args.mount_path)
  File "/home/rgottula/dev/track/track/mounts.py", line 393, in __init__
    accel_limit=max_slew_accel,
  File "/home/rgottula/dev/point/point/gemini.py", line 77, in __init__
    self.set_double_precision()
  File "/home/rgottula/dev/point/point/gemini.py", line 413, in set_double_precision
    self.exec_cmd(G2Cmd_SetDblPrecision())
  File "/home/rgottula/dev/point/point/gemini.py", line 94, in exec_cmd
    return self._backend.execute_one_command(cmd)
  File "/home/rgottula/dev/point/point/gemini_backend.py", line 198, in execute_one_command
    raise G2BackendReadTimeoutError('gave up after {:d} NACK retry attempts'.format(retry_num))
point.gemini_exceptions.G2BackendReadTimeoutError: gave up after 5 NACK retry attempts
Exception ignored in: <bound method Gemini2.__del__ of <point.gemini.Gemini2 object at 0x7fb20c95a710>>
Traceback (most recent call last):
  File "/home/rgottula/dev/point/point/gemini.py", line 91, in __del__
    self.stop_motion()
  File "/home/rgottula/dev/point/point/gemini.py", line 650, in stop_motion
    (actual_rate_ra, limits_exceeded) = self.slew('ra', 0.0)
  File "/home/rgottula/dev/point/point/gemini.py", line 571, in slew
    time_since_last = current_time - self._cached_slew_rate[axis + '_last_cmd_time']
AttributeError: 'Gemini2' object has no attribute '_cached_slew_rate'
@bgottula bgottula self-assigned this Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant