labscript-suite-oldfinal1 / blacs

BLACS, part of the labscript suite, provides an interface to hardware used to control a buffered experiment. It manages a queue of shots to be run as well as providing manual control over devices between shots.
Other
1 stars 1 forks source link

Error not handled well during connection table recompile #12

Open philipstarkey opened 9 years ago

philipstarkey commented 9 years ago

Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


Today when attempting to have BLACS recompile my connection table I had a ZMQ timeout error. After this, the popup window was unresponsive, with the three buttons at the bottom greyed out, and the [x] button in the corner of the window not doing anything.

The error, as displayed in the output window, is:

#!python

Traceback (most recent call last):
  File "C:\pythonlib\runmanager\batch_compiler.py", line 19, in <module>
    import labscript
  File "C:\pythonlib\labscript\__init__.py", line 14, in <module>
    from labscript import *
  File "C:\pythonlib\labscript\labscript.py", line 22, in <module>
    import runmanager
  File "C:\pythonlib\runmanager\__init__.py", line 25, in <module>
    import labscript_utils.h5_lock
  File "C:\pythonlib\labscript_utils\h5_lock.py", line 98, in <module>
    connect_to_zlock_server()
  File "C:\pythonlib\labscript_utils\h5_lock.py", line 91, in connect_to_zlock_server
    zprocess.locking.connect(host, port)
  File "C:\Python27\lib\site-packages\zprocess-1.1.6-py2.7.egg\zprocess\locking\__init__.py", line 373, in connect
    ping(timeout)
  File "C:\Python27\lib\site-packages\zprocess-1.1.6-py2.7.egg\zprocess\locking\__init__.py", line 337, in ping
    return _zmq_lock_client.say_hello(timeout)
  File "C:\Python27\lib\site-packages\zprocess-1.1.6-py2.7.egg\zprocess\locking\__init__.py", line 114, in say_hello
    raise zmq.ZMQError('No response from zlock server: timed out')
zmq.error.ZMQError: No response from zlock server: timed out

The line above the output window still says "Recompiling connection table"

philipstarkey commented 9 years ago

Original comment by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


Looks like this is actually a bug in the runmanager API

philipstarkey commented 9 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


Further details: The asynchronous compilation functions of the runmanager API need to catch exceptions in the worker processes and call done_callback(False)

philipstarkey commented 9 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


This issue is now blocked by: https://bitbucket-archive.labscriptsuite.org/#!/labscript_suite/runmanager/issues/35/asynchronous-compilation-functions-should (labscript-suite/runmanager#35)

philipstarkey commented 5 years ago

Original comment by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


This is still an issue, I just came across it again (seems as though matplotlib is being loaded by labscript which is loaded by runmanager, but matplotlib is trying to use a Qt5 backend on a Qt4 install)

philipstarkey commented 5 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


I encountered this too - the workaround was to just open another compile-and-restart window :p.

Anyway, should be able to fix this pretty easily, I'll give it a go.