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

How to reset coordinator once initialized? #114

Open
Ashwolaa opened this issue Mar 7, 2025 · 1 comment
Open

How to reset coordinator once initialized? #114

Ashwolaa opened this issue Mar 7, 2025 · 1 comment

Comments

@Ashwolaa
Copy link

Ashwolaa commented Mar 7, 2025

Hi,

I am trying to use PyLECO with PyMoDAQ and I am struggling a bit with it. I was wondering to start with how to restart a coordinator. I started some with PyMoDAQ directly from the dashboard.

However, it seems that it does not disapear even when I close the dashboard. What would be the approach to reset it?

(PyMoDAQ) PS C:> coordinator
Start Coordinator of node b'ismo-0098-tb' at port '12300'.
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "PyMoDAQ\Scripts\coordinator.exe_main
.py", line 7, in
File "PyMoDAQ\Lib\site-packages\pyleco\coordinators\coordinator.py", line 517, in main
with Coordinator(**kwargs) as c:
^^^^^^^^^^^^^^^^^^^^^
File "PyMoDAQ\Lib\site-packages\pyleco\coordinators\coordinator.py", line 124, in init
self.sock.bind(port=port)
File "PyMoDAQ\Lib\site-packages\pyleco\utils\coordinator_utils.py", line 91, in bind
self._sock.bind(f"tcp://{host}:{port}")
File "PyMoDAQ\Lib\site-packages\zmq\sugar\socket.py", line 317, in bind
super().bind(addr)
File "_zmq.py", line 917, in zmq.backend.cython._zmq.Socket.bind
File "_zmq.py", line 179, in zmq.backend.cython._zmq._check_rc
zmq.error.ZMQError: Address in use (addr='tcp://*:12300')

@BenediktBurger
Copy link
Member

You can use the CoordinatorDirector from pyleco.coordinators: Just create an instance of it and issue shut_down_actor().
That will connect to the Coordinator and tell it to stop.

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

No branches or pull requests

2 participants