-
Notifications
You must be signed in to change notification settings - Fork 52
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
Execution Blocked if Socket times out or unavailable. (Core) #786
Labels
bug
Something isn't working
Comments
Should be fixed in |
Thanks, after upgrading to the latest release, that issue was fixed for this Exception. >>> from pycromanager import Core
>>> core = Core()
>>> props = core.get_device_property_names('Z')
>>> props
<pyjavaz.bridge.mmcorej_StrVector object at 0x0000023EFF2962E0>
>>> props.get(3)
'Position'
>>> props.get(6)
Exception in thread BridgeSocketThread_port4827:
Traceback (most recent call last):
File "C:\Users\Nour\AppData\Local\Programs\Python\Python39\lib\threading.py", line 980, in _bootstrap_inner
self.run()
File "C:\Users\Nour\AppData\Local\Programs\Python\Python39\lib\threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Nour\AppData\Local\Programs\Python\Python39\lib\site-packages\pyjavaz\bridge.py", line 367, in _run_socket_thread
response = socket.receive()
File "C:\Users\Nour\AppData\Local\Programs\Python\Python39\lib\site-packages\pyjavaz\bridge.py", line 192, in receive
self._check_exception(message)
File "C:\Users\Nour\AppData\Local\Programs\Python\Python39\lib\site-packages\pyjavaz\bridge.py", line 197, in _check_exception
raise Exception(response["value"])
Exception: java.lang.IndexOutOfBoundsException: vector index out of range
mmcorej.MMCoreJJNI.StrVector_get(Native Method)
mmcorej.StrVector.get(StrVector.java:113)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.micromanager.pyjavaz.ZMQServer.runMethod(ZMQServer.java:431)
org.micromanager.pyjavaz.ZMQServer.parseAndExecuteCommand(ZMQServer.java:511)
org.micromanager.pyjavaz.ZMQServer.lambda$initialize$2(ZMQServer.java:121)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
Thanks! |
I think now fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm uncertain whether this was done on purpose or if it's a bug. If a timeout occurs or if micromanager isn't running, the entire code freezes and the exception cannot be handled.
Code for reproduction
Expected outcome
where further execution is not blocked
Actual outcome
The text was updated successfully, but these errors were encountered: