srobo / sr-robot3-j5

Python 3 API for Student Robotics Kit - Built with j5
MIT License
4 stars 1 forks source link

MissingCalibrationsError when no calibrations set #37

Closed trickeydan closed 1 year ago

trickeydan commented 3 years ago

In #29 we didn't add a calibration for when no known camera is found. We decided not to add a fallback calibration during review.

When no known camera is found, the following error occurs:

>>> r.camera.see()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/site-packages/j5_zoloto/board.py", line 54, in see
    return self._camera.see(eager=eager)
  File "/usr/lib/python3.9/site-packages/j5_zoloto/component.py", line 91, in see
    return list(self._backend.process_frame_eager(self._identifier))
  File "/usr/lib/python3.9/site-packages/zoloto/cameras/base.py", line 124, in process_frame_eager
    raise MissingCalibrationsError()
zoloto.exceptions.MissingCalibrationsError

At the very least this is deceptive and we should add a clearer error message.

trickeydan commented 1 year ago

Closed by #89 as Zoloto is no longer used.