Hi, I want to signal an error on a fresh installation of labscript-suite on Windows and its solution.
The error occurs with Python 3.10 on a newer computer and I could reproduce it with Python 3.8 on Windows 7.
We were following the "regular python" installation guide on a new virtual environment:
The first error occurs when starting blacs:
File "<instdir>.venv\lib\site-packages\blacs\__main__.py", line 756, in <module>
experiment_server = ExperimentServer(port)
File "<path>.venv\lib\site-packages\labscript_utils\ls_zprocess.py", line 190, in __init__
zprocess.ZMQServer.__init__(
File "<path>.venv\lib\site-packages\zprocess\clientserver.py", line 483, in __init__
_ZMQServer.__init__(self, port, dtype=dtype, pull_only=pull_only,
File "<path>.venv\lib\site-packages\zprocess\clientserver.py", line 137, in __init__
self.sock.bind('%s:%d' % (self.bind_address, self.port))
File "<path>.venv\lib\site-packages\zprocess\security.py", line 217, in bind
return self._bind_or_connect(addr, bind=True)
File "<path>.venv\lib\site-packages\zprocess\security.py", line 204, in _bind_or_connect
result = method(self, addr)
File "<path>.venv\lib\site-packages\zmq\sugar\socket.py", line 311, in bind
super().bind(addr)
File "_zmq.py", line 898, in zmq.backend.cython._zmq.Socket.bind
File "_zmq.py", line 160, in zmq.backend.cython._zmq._check_rc
zmq.error.ZMQError: No such device (addr='tcp://
0.0.0.0:42517')
The problem is described here:
I have modified in <path>.venv/Lib/site-packages/labscript-utils/ls_zprocess.py line 170:
bind_address='tcp://
0.0.0.0',
changed to:
bind_address='tcp://*',
After this blacs is starting but gives another similar error:
File "C:\Python3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "<path>.venv\lib\site-packages\zprocess\utils.py", line 122, in _reraise
raise value.with_traceback(traceback)
File "<path>.venv\lib\site-packages\blacs\__main__.py", line 272, in __init__
self.tablist[device_name] = TabClass(self.tab_widgets[0],self.settings_dict[device_name])
File "<path>.venv\lib\site-packages\blacs\device_base_class.py", line 36, in __init__
Tab.__init__(self,notebook,settings,restart)
File "<path>.venv\lib\site-packages\blacs\tab_base_classes.py", line 281, in __init__
self._output_box = OutputBox(self._ui.splitter)
File "<path>.venv\lib\site-packages\labscript_utils\qtwidgets\outputbox.py", line 27, in __init__
qtutils.outputbox.OutputBox.__init__(
File "<path>.venv\lib\site-packages\qtutils\outputbox.py", line 149, in __init__
self.port = socket.bind_to_random_port(bind_address)
File "<path>.venv\lib\site-packages\zmq\sugar\socket.py", line 499, in bind_to_random_port
self.bind("%s:*" % addr)
File "<path>.venv\lib\site-packages\zprocess\security.py", line 217, in bind
return self._bind_or_connect(addr, bind=True)
File "<path>.venv\lib\site-packages\zprocess\security.py", line 204, in _bind_or_connect
result = method(self, addr)
File "<path>.venv\lib\site-packages\zmq\sugar\socket.py", line 311, in bind
super().bind(addr)
File "_zmq.py", line 898, in zmq.backend.cython._zmq.Socket.bind
File "_zmq.py", line 160, in zmq.backend.cython._zmq._check_rc
zmq.error.ZMQError: No such device (addr='tcp://0.0.0.0:*')
I have changed also this file <path>.venv/lib/site-packages/labscript-utils/qtwidgets/outputbox.py line 32:
bind_address='tcp://
0.0.0.0',
change to:
bind_address='tcp://*',
This has solved the issue and blacs, runmanager, runviewer and lyse start without further issues.
Andreas