When I move x, y, or z position of the stage, the code goes into the following fit (started OFM server in debug mode via OFM serve
CLI command). Any advice on getting right appreciated.:
INFO:root:Loading /home/pi/openflexure/settings/microscope_settings.json...
INFO:root:Loading /home/pi/openflexure/settings/microscope_settings.json...
INFO:root:Loading /home/pi/openflexure/settings/microscope_settings.json...
INFO:root:Loading /home/pi/openflexure/settings/microscope_settings.json...
INFO:root:Loading /home/pi/openflexure/settings/microscope_configuration.json...
INFO:root:Loading /home/pi/openflexure/settings/microscope_configuration.json...
WARNING:root:PiCameraStreamer.camera is deprecated. Replace with PiCameraStreamer.picamera
WARNING:root:PiCamera.lens_shading_table returned as None
INFO:root:Loading /home/pi/openflexure/settings/microscope_settings.json...
ERROR:root:Traceback (most recent call last):
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/labthings/actions/thread.py", line 255, in wrapped
self._return_value = f(*args, **kwargs)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/flask/ctx.py", line 158, in wrapper
return func(*args, **kwargs)
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/api/v2/views/actions/stage.py", line 49, in post
return microscope.state["stage"]["position"]
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/microscope.py", line 209, in state
return {"camera": self.camera.state, "stage": self.stage.state}
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/stage/sanga.py", line 55, in state
return {"position": self.position_map}
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/stage/base.py", line 51, in position_map
return {"x": self.position[0], "y": self.position[1], "z": self.position[2]}
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/stage/sanga.py", line 72, in position
return self.board.position
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/sangaboard/extensible_serial_instrument.py", line 484, in __get__
value = obj.parsed_query(self.get_cmd, self.response_string)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/sangaboard/extensible_serial_instrument.py", line 305, in parsed_query
% (query_string, original_reply, response_string, response_regex)
ValueError: Stage response to 'p?' ('step: 2') wasn't matched by /%d %d %d/ (generated regex /([-+]?\d+) ([-+]?\d+) ([-+]?\d+)/)
Exception in thread Thread-67:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/labthings/actions/thread.py", line 224, in run
self._thread_proc(self._target)(*self._args, **self._kwargs)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/labthings/actions/thread.py", line 277, in wrapped
raise e
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/labthings/actions/thread.py", line 255, in wrapped
self._return_value = f(*args, **kwargs)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/flask/ctx.py", line 158, in wrapper
return f(*args, **kwargs)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/webargs/core.py", line 450, in wrapper
return func(*args, **kwargs)
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/api/v2/views/actions/stage.py", line 49, in post
return microscope.state["stage"]["position"]
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/microscope.py", line 209, in state
return {"camera": self.camera.state, "stage": self.stage.state}
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/stage/sanga.py", line 55, in state
return {"position": self.position_map}
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/stage/base.py", line 51, in position_map
return {"x": self.position[0], "y": self.position[1], "z": self.position[2]}
File "/var/openflexure/application/openflexure-microscope-server/openflexure_microscope/stage/sanga.py", line 72, in position
return self.board.position
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/sangaboard/extensible_serial_instrument.py", line 484, in __get__
value = obj.parsed_query(self.get_cmd, self.response_string)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.7/site-packages/sangaboard/extensible_serial_instrument.py", line 305, in parsed_query
% (query_string, original_reply, response_string, response_regex)
ValueError: Stage response to 'p?' ('step: 2') wasn't matched by /%d %d %d/ (generated regex /([-+]?\d+) ([-+]?\d+) ([-+]?\d+)/)
ERROR:root:Stage response to 'p?' ('--> in stepMotor. This step: 1') wasn't matched by /%d %d %d/ (generated regex /([-+]?\d+) ([-+]?\d+) ([-+]?\d+)/)