python-microscope / microscope

Python library for control of microscope devices, supporting hardware triggers and distribution of devices over the network for performance and flexibility.
https://www.python-microscope.org
GNU General Public License v3.0
73 stars 42 forks source link

Thorlabs filter wheel get position fails. #192

Open iandobbie opened 3 years ago

iandobbie commented 3 years ago

Traceback below . I guess that the reply to "pos?" doesn't parse as an int.

2021-02-26 15:33:22,563:ThorlabsFW102C (microscope.abc):ERROR:PID 6116: in get_setting(position):
Traceback (most recent call last):
  File "c:\microscope\microscope\abc.py", line 442, in get_setting
    return self._settings[name].get()
  File "c:\microscope\microscope\abc.py", line 156, in get
    value = self._get()
  File "c:\microscope\microscope\abc.py", line 1319, in get_position
    return self.position
  File "c:\microscope\microscope\abc.py", line 1293, in position
    return self._do_get_position()
  File "c:\microscope\microscope\filterwheels\thorlabs.py", line 83, in _do_get_position
    return int(self._send_command("pos?")) - 1
ValueError: invalid literal for int() with base 10: ''
carandraug commented 3 years ago

The reply seems to have been a empty string. Was there maybe a timeout?