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

Collection of Merlin todo's #71

Closed
3 tasks done
stefsmeets opened this issue Jun 7, 2023 · 1 comment · Fixed by #74
Closed
3 tasks done

Collection of Merlin todo's #71

stefsmeets opened this issue Jun 7, 2023 · 1 comment · Fixed by #74

Comments

@stefsmeets
Copy link
Member

stefsmeets commented Jun 7, 2023

@stefsmeets
Copy link
Member Author

Merlin command port already connected is misleading, this is without a Merlin instance running or available:

timeout                                   Traceback (most recent call last)
File ~\python\instamatic\instamatic\camera\camera_merlin.py:304, in CameraMerlin.establishConnection(self)
    303 try:
--> 304     self.s_cmd.connect((self.host, self.commandport))
    306 except ConnectionRefusedError as e:

timeout: timed out

The above exception was the direct cause of the following exception:

RuntimeError                              Traceback (most recent call last)
Cell In[1], line 4
      1 from instamatic import TEMController
      2 from instamatic.formats import write_tiff
----> 4 ctrl = TEMController.initialize()

File ~\python\instamatic\instamatic\TEMController\TEMController.py:60, in initialize(tem_name, cam_name, stream)
     56         cam_tag = ''
     58     print(f'Camera    : {cam_name}{cam_tag}')
---> 60     cam = Camera(cam_name, as_stream=stream, use_server=use_cam_server)
     61 else:
     62     cam = None

File ~\python\instamatic\instamatic\camera\camera.py:67, in Camera(name, as_stream, use_server)
     65         as_stream = False  # override `as_stream` for this interface
     66     else:
---> 67         cam = cam_cls(name=name)
     69 if as_stream:
     70     if cam.streamable:

File ~\python\instamatic\instamatic\camera\camera_merlin.py:63, in CameraMerlin.__init__(self, name)
     59 self._soft_trigger_exposure = None
     61 self.load_defaults()
---> 63 self.establishConnection()
     64 self.establishDataConnection()
     66 msg = f'Camera {self.getName()} initialized'

File ~\python\instamatic\instamatic\camera\camera_merlin.py:311, in CameraMerlin.establishConnection(self)
    307     raise RuntimeError(
    308         f'Could not establish command connection to {self.name}, '
    309         '(Merlin command port not responding).') from e
    310 except OSError as e:
--> 311     raise RuntimeError(
    312         f'Could not establish command connection to {self.name}, '
    313         '(Merlin command port already connected).') from e
    315 version = self.merlin_get(key='SOFTWAREVERSION')
    316 logger.info('Merlin version: %s', version)

RuntimeError: Could not establish command connection to merlin, (Merlin command port already connected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant