Problem of exception coming from acquisition with pycromanger
f5599 opened this issue · 3 comments
Hello
I take the liberty of contacting you to ask you for help with pycro-manager
Currently I am considering using pycro-manage to control the micro-manager software but I am having exceptional problems with Bridge.
I want to integrate all the features of micro-manager on my python code with pycro-manager but I can't do it.
That is why I am asking for your support.
Thanks in advance
Sincerely,
-- coding: utf-8 --
"""
Created on Thu May 2 09:49:07 2024
@author: baraf
"""
import numpy as np
from pycromanager import multi_d_acquisition_events, Acquisition
Generate the events for a single z-stack
events = multi_d_acquisition_events(z_start=0, z_end=10, z_step=0.5)
Create an Acquisition object and use it to acquire images
with Acquisition(directory=r'C:\Users\baraf\OneDrive\Bureau\ecole', name='acquisition_name', show_viewer=True) as acq:
acq.acquire(events)
Problème
Python 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython -- An enhanced Interactive Python.
runfile('C:/Users/baraf/OneDrive/Bureau/sanstitre3.py', wdir='C:/Users/baraf/OneDrive/Bureau')
C:\Users\baraf\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyjavaz\bridge.py:308: UserWarning: Version mistmatch between Java ZMQ server and Python client.
Java ZMQ server version: 4.0.0
Python client expected version: 5.1.0
To fix, update to BOTH latest pycromanager and latest micro-manager nightly build
warnings.warn(
Traceback (most recent call last):
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\users\baraf\onedrive\bureau\sanstitre3.py:16
with Acquisition(directory='C:\Users\baraf\OneDrive\Bureau\ecole', name='acquisition_name', show_viewer=True) as acq:
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pycromanager\acquisition\acq_constructor.py:45 in new
return JavaBackendAcquisition(**named_args)
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pycromanager\acquisition\java_backend_acquisitions.py:279 in init
self._create_remote_acquisition(**named_args)
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pycromanager\acquisition\java_backend_acquisitions.py:521 in _create_remote_acquisition
self._acq = acq_factory.create_acquisition(kwargs['directory'], kwargs['name'], show_viewer,
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyjavaz\bridge.py:488 in
): instance._translate_call(signatures_list, args, static=_java_class == 'java.lang.Class')
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyjavaz\bridge.py:698 in _translate_call
valid_method_spec, deserialize_types = _check_method_args(method_specs, fn_args)
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyjavaz\bridge.py:870 in _check_method_args
raise Exception(
Exception: Incorrect arguments.
Expected java.lang.String, java.lang.String, boolean, boolean, int, int, int, int, boolean
Got <class 'str'>, <class 'str'>, <class 'bool'>, <class 'int'>, <class 'bool'>
As it says in the message: To fix, update to BOTH latest pycromanager and latest micro-manager nightly build
thank you I got it.
Now I have a labview source code which allows me to control the helmholtz coils with three axes x,y,z and I want to integrate it into micromanager
Do you have an idea on how to integrate it into micromanager?