micro-manager / pycro-manager

Python control of micro-manager for customized data acquisition
https://pycro-manager.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
165 stars 52 forks source link

error on running script to verify install #737

Closed ThomasDzelzainis closed 7 months ago

ThomasDzelzainis commented 10 months ago

Hi,

I am just reporting an error I am getting. I think something similar has been reported before and is just an issue with cleanup, but thought it may be worth reporting anyway in case it helps you track down the source.

I have installed the latest nightly build of micromanager, and at the same time installed pycro-manager using pip install. I am using python 3.12.1 64 bit, and runing the script through visual studio code version 1.85.2

When I run the example script to verify pycro installation, it gives the expected output, and then a traceback for an error. Full output is as follows:

<pycromanager.zmq_bridge.bridge.mmcorej_CMMCore object at 0x000001F2CAC4B260> Traceback (most recent call last): File "C:\Users\xwv33915\AppData\Local\Programs\Python\Python312\Lib\site-packages\pycromanager\zmq_bridge\bridge.py", line 655, in del self._close() File "C:\Users\xwv33915\AppData\Local\Programs\Python\Python312\Lib\site-packages\pycromanager\zmq_bridge\bridge.py", line 577, in _close reply_json = self._get_bridge()._receive(timeout=self._timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xwv33915\AppData\Local\Programs\Python\Python312\Lib\site-packages\pycromanager\zmq_bridge\bridge.py", line 340, in _receive return self._main_socket.receive(timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xwv33915\AppData\Local\Programs\Python\Python312\Lib\site-packages\pycromanager\zmq_bridge\bridge.py", line 166, in receive reply = self._socket.recv_multipart(flags=zmq.NOBLOCK) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xwv33915\AppData\Local\Programs\Python\Python312\Lib\site-packages\zmq\sugar\socket.py", line 805, in recv_multipart parts = [self.recv(flags, copy=copy, track=track)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "zmq\backend\cython\socket.pyx", line 805, in zmq.backend.cython.socket.Socket.recv File "zmq\backend\cython\socket.pyx", line 841, in zmq.backend.cython.socket.Socket.recv File "zmq\backend\cython\socket.pyx", line 199, in zmq.backend.cython.socket._recv_copy File "zmq\backend\cython\socket.pyx", line 194, in zmq.backend.cython.socket._recv_copy File "zmq\backend\cython\checkrc.pxd", line 21, in zmq.backend.cython.checkrc._check_rc ImportError: sys.meta_path is None, Python is likely shutting down Exception in destructor for <pycromanager.zmq_bridge.bridge.mmcorej_CMMCore object at 0x000001F2CAC4B260> on thread MainThread

Anyway, thanks for developing pycro-manager, I think it is going to be very useful for my work!

Cheers,

Tom.

henrypinkard commented 7 months ago

Thanks for the reporting the error -- I think I finally found the fix in https://github.com/micro-manager/pycro-manager/pull/740