Labscript suite installation issues

545 views
Skip to first unread message

Pierre Colombo

unread,
Jan 30, 2017, 10:02:04 AM1/30/17
to The labscript suite
Hello,
Thanks for your work on Labscript.
I meet problems when I install Labscript, i have followed the https://bitbucket.org/labscript_suite/installer.
Configuration :
- Windows 64 bits
- Anaconda 2.7
- zmq version 4.1.5 
-zprocess version 1.3.3
-pyzmq version 15.4.0

When I try to launch runviewer i get :

Traceback (most recent call last):
  File "C:\labscript_suite\runviewer\__main__.py", line 47, in <module>
    import zprocess.locking, labscript_utils.h5_lock, h5py
  File "C:\labscript_suite\labscript_utils\h5_lock.py", line 98, in <module>
    connect_to_zlock_server()
  File "C:\labscript_suite\labscript_utils\h5_lock.py", line 89, in connect_to_zlock_server
    zprocess.locking.connect(host,port,timeout=15)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 373, in connect
    ping(timeout)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 337, in ping
    return _zmq_lock_client.say_hello(timeout)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 114, in say_hello
    raise zmq.ZMQError('No response from zlock server: timed out')
ZMQError: No response from zlock server: timed out

Runmanager :
Traceback (most recent call last):
  File "C:\labscript_suite\runmanager\__main__.py", line 66, in <module>
    import runmanager
  File "C:\labscript_suite\runmanager\__init__.py", line 25, in <module>
    import labscript_utils.h5_lock
  File "C:\labscript_suite\labscript_utils\h5_lock.py", line 98, in <module>
    connect_to_zlock_server()
  File "C:\labscript_suite\labscript_utils\h5_lock.py", line 89, in connect_to_zlock_server
    zprocess.locking.connect(host,port,timeout=15)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 373, in connect
    ping(timeout)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 337, in ping
    return _zmq_lock_client.say_hello(timeout)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 114, in say_hello
    raise zmq.ZMQError('No response from zlock server: timed out')
ZMQError: No response from zlock server: timed out

Lyse :
Traceback (most recent call last):
  File "C:\labscript_suite\lyse\__main__.py", line 23, in <module>
    import labscript_utils.h5_lock
  File "C:\labscript_suite\labscript_utils\h5_lock.py", line 98, in <module>
    connect_to_zlock_server()
  File "C:\labscript_suite\labscript_utils\h5_lock.py", line 89, in connect_to_zlock_server
    zprocess.locking.connect(host,port,timeout=15)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 373, in connect
    ping(timeout)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 337, in ping
    return _zmq_lock_client.say_hello(timeout)
  File "C:\Program Files\Anaconda2\lib\site-packages\zprocess\locking\__init__.py", line 114, in say_hello
    raise zmq.ZMQError('No response from zlock server: timed out')
ZMQError: No response from zlock server: timed out

And blacs doesn't seem to work .

Do you have any ideas on how to correct this server connection pb ?

Best


Chris Billington

unread,
Jan 30, 2017, 10:11:52 AM1/30/17
to labscri...@googlegroups.com
Hi Pierre,

This is due to a faulty version of the zprocess module that I accidentally published. I thought I had taken it down but clearly I have not done so correctly. I apologise. You can downgrade to the unbroken version of zprocess with:

pip install zprocess==1.3.3

From the Windows command line. (you may need to type the full path to pip, 
C:\Program Files\Anaconda2\bin\pip, if this doesn't work).

Regards, 

Chris

--
You received this message because you are subscribed to the Google Groups "The labscript suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuite+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pierre Colombo

unread,
Jan 30, 2017, 10:28:42 AM1/30/17
to The labscript suite
Hi Chris,
Thanks for your fast reply in fact i have installed zprocess 1.3.3 as you suggest in the previous post .

Chris

To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuit...@googlegroups.com.

Chris Billington

unread,
Jan 30, 2017, 10:48:45 AM1/30/17
to labscri...@googlegroups.com
Hi Pierre,

My mistake, you did mention the version numbers of everything, thanks for that.

In that case, we should verify whether "zlock" is configured correctly. zlock is a server program that all other programs in the labscript suite use to coordinate their access to files, so that they don't simultaneously write to the same files as each other. A zlock server must be running in order for the other programs to connect to it, and what you're seeing here are errors saying that the programs could not connect to the zlock server.

Could you let me know what your configuration in C:\labscript_suite\labconfig\<your_computers_hostname>.ini is? There should be a section called [servers], could you let me know what the zlock server is set to?

By default, it is set to localhost - so it shouldn't have changed unless you changed it yourself. If it set to localhost, then programs that need to use zlock should launch a server automatically if one is not already running. However, if it's set to some other computer, then a zlock server needs to be manually started on that computer.

A zlock server can be started manually with:

python -m zprocess.locking

from the command line. Running this line should give you an error if a zlock server is already running, which could be useful to know.

Regards,

Chris

To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuite+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Chris Billington
School of Physics and Astronomy
Monash University
Victoria 3800, Australia
Ph: +61 423952456

Pierre Colombo

unread,
Jan 30, 2017, 10:58:04 AM1/30/17
to The labscript suite
Hi Chris,
This is the content of the file : server seems correct,
[DEFAULT]
experiment_name = example_experiment
shared_drive = C:
experiment_shot_storage = %(shared_drive)s\Experiments\%(experiment_name)s
labscript_suite = C:\labscript_suite
labscriptlib = %(labscript_suite)s\userlib\labscriptlib\%(experiment_name)s
analysislib = %(labscript_suite)s\userlib\analysislib\%(experiment_name)s
pythonlib = %(labscript_suite)s\userlib\pythonlib

[servers]
zlock = localhost

[ports]
blacs = 42517
lyse = 42519
mise = 42520
runviewer = 42521
zlock = 7339

[programs]
text_editor = C:\Program Files (x86)\Notepad++\notepad++.exe
text_editor_arguments = {file}
hdf5_viewer = C:\Program Files\TheHDFGroup\HDFView2.7\HDFView.exe
hdf5_viewer_arguments = {file}

[paths]
connection_table_h5 = %(experiment_shot_storage)s\connectiontable.h5
connection_table_py = %(labscriptlib)s\connectiontable.py

[runmanager]
autoload_config_file = %(experiment_shot_storage)s\runmanager.ini
output_folder_format = %%Y\%%m\%%d

[lyse]
autoload_config_file = %(experiment_shot_storage)s\lyse.ini

If I try to start the server manually I get : zmq.error.ZMQError : Adress in use, I guess this means that the server is runing ?

But this is not working.
(please find attached the screenshot)
Thanks for your time,
best,
Pierre
Screen.PNG

Chris Billington

unread,
Jan 30, 2017, 11:09:23 AM1/30/17
to labscri...@googlegroups.com
Thank you,

Well, this looks very much like the bug in zprocess 2.0.0. Did you install zprocess 2.0.0 at some point, and then downgrade? If so, it would be good to confirm zprocess 2.0.0 is really gone, which you could o by browsing to Anaconda2\lib\site-packages\ AMD confirming that there is only one zprocess folder there.

Also if you import zprocess in a python interaction session and print zprocess.__version__, that will help confirm you're using the right version as well.

Otherwise, an issue might be firewalling. Since a server is already running, it would be good if you could kill it, via Windows' task manager, and start one manually yourself. That way you can see whether any information is reaching the zlock server - because it will print it out on the terminal.


To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuite+unsubscribe@googlegroups.com.

Pierre Colombo

unread,
Jan 30, 2017, 11:29:03 AM1/30/17
to The labscript suite
Thank you for your help : 
- zprocess is gone for good 
- import zprocess, zprocess.__version__ gives me 1.3.3 .
- i don't find the relevant process to kill the server do you have any idea of the name ?


I just noticed a stange thing :
- am I supposer to install all the suite on after the other by cloning the repo ? (https://bitbucket.org/labscript_suite/)
- or can i use the the installer ? https://bitbucket.org/labscript_suite/installer that what i did but it was updated only in2015 !

Best 
Pierre

Chris Billington

unread,
Jan 30, 2017, 11:57:51 AM1/30/17
to labscri...@googlegroups.com
Windows task manager will likely just list the process as 'python', so if there is only one process named 'python', that will be it. Otherwise, there is some way (mouseover tooltip?) to view the process's command line arguments, which should be 'python -m zprocess.locking.locking'. Also, a reboot will get rid of it.

Nope, you are supposed to use the installer (by cloning its repository), as you did. It doesn't update often, because it is configured to install the latest version of each other component, rather than any specific version. So the labscript suite can change quite a bit without the installer changing at all.

To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuite+unsubscribe@googlegroups.com.

Pierre Colombo

unread,
Jan 30, 2017, 12:07:56 PM1/30/17
to The labscript suite
Alright THANKS A LOT. I can start now : 
- lyse 
-runmanager
-runviewer 

I killed the server manually and did : python -m zprocess.locking and it is working :D ! 

Do you think I have to do the same trick every time I start ?

Now I have another error for blacs (before it didn't start ) : 
Traceback (most recent call last):
  File "C:\labscript_suite\blacs\__main__.py", line 687, in <module>
    connection_table = ConnectionTable(connection_table_h5_file)
  File "C:\labscript_suite\blacs\connections.py", line 27, in __init__
    with h5py.File(h5file,'r') as hdf5_file:
  File "C:\labscript_suite\labscript_utils\h5_lock.py", line 42, in __init__
    _orig_init(self, name, mode, driver, libver, **kwds)
  File "C:\Program Files\Anaconda2\lib\site-packages\h5py\_hl\files.py", line 272, in __init__
    fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
  File "C:\Program Files\Anaconda2\lib\site-packages\h5py\_hl\files.py", line 92, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (C:\Minonda\conda-bld\h5py_1474482483473\work\h5py\_objects.c:2705)
  File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (C:\Minonda\conda-bld\h5py_1474482483473\work\h5py\_objects.c:2663)
  File "h5py\h5f.pyx", line 76, in h5py.h5f.open (C:\Minonda\conda-bld\h5py_1474482483473\work\h5py\h5f.c:1951)
IOError: Unable to open file (Unable to open file: name = 'c:\experiments\example_experiment\connectiontable.h5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)

Do you have any ideas ?

Pierre Colombo

unread,
Jan 30, 2017, 12:12:09 PM1/30/17
to The labscript suite
Am I supposed to create the connectiontable.h5 before launching blacs ?

Philip Starkey

unread,
Jan 30, 2017, 5:14:10 PM1/30/17
to labscri...@googlegroups.com
Hi Pierre,

You do need to create a connection table h5 file for the first launch of BLACS. A good starting point is to compile the labscript/example.py file from runmanager, and copy the resulting h5 file to the location of your connection table as per the setting in the labconfig file. Further information on this can be found on our documentation page (the "Using BLACS" document is a good place to start), however please note that the labscript API documentation is somewhat out of date, particularly with the instantiation of PseudoclockDevices. The labscript/example.py file shows the updated way to instantiate PulseBlasters and PineBlasters and associated ClockLines. If you have any questions about this, please let us know!

Once you've made the connection table h5 file, and launched BLACS, you can recompile the connection table .py (as specified in your labconfig file) file from within BLACS, so you won't have to do the more complicated file copy every time you want to change the connection table.

Cheers,
Phil
--
Philip Starkey
School of Physics and Astronomy
Monash University
To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuite+unsubscribe@googlegroups.com.

Pierre Colombo

unread,
Jan 31, 2017, 3:20:32 AM1/31/17
to The labscript suite
Hi Philip,
Thanks for your help, the point is i cannot compile example.py.
I get an error : 
Capture.PNG

Pierre Colombo

unread,
Jan 31, 2017, 4:17:51 AM1/31/17
to The labscript suite
Hi,
If i try to generate via runmanger I get an server time out error. 
I have tryied to execute as an admin the runmanager and launch manually runmanger with admin privileges but I canno't get the hd5 file, i always get the server timed out error.
Thanks for your time
Best
Pierre

Philip Starkey

unread,
Jan 31, 2017, 4:41:57 AM1/31/17
to labscri...@googlegroups.com
Hi Pierre,

If the timeout error is relating to sending the shot to BLACS, this is expected behaviour if you have "run shots" ticked in runmanager and BLACS is not running. Feel free to untick "run shots" in runmanager when you just want to produce the HDF5 file but not send it to BLACS for execution.

That said, regardless of the error in sending the files to BLACS, the HDF5 files are still being produced in the folder specified by "shot output folder" in runmanager.

Cheers,
Phil

--
Philip Starkey
School of Physics and Astronomy
Monash University

To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuite+unsubscribe@googlegroups.com.

Chris Billington

unread,
Jan 31, 2017, 10:24:33 AM1/31/17
to labscri...@googlegroups.com
Hi Pierre,

Just about the zlock difficulties - no, you shouldn't have to launch the server yourself. So something is still not quite right, although the workaround of launching it yourself is obviously fixing things. So if everything else is fine it's ok to keep doing this, but I'm wary that other problems might still come up.

I notice that some of your error messages are coming from Python packages in C:\Program Files\Anaconda2, and others are coming from C:\Miniconda. Do you possible have multiple Python installations on this computer? If so, this might still leave room for multiple versions of packages being around (and might still explain the zprocess bug - perhaps zprocess 2.0 is in C:\Miniconda?). The labscript suite creates shortcuts and sets up paths based on whichever Python executable was used to run the installer, which, if you have since installed a different Python distribution, may not be the same as what you currently get by typing 'python' in a terminal. I admit I'm not totally sure how Anaconda and Miniconda interact - perhaps it's normal to have a Python distribution spread between the two folders, but I wouldn't have thought so.

So I just wanted to advise it can definitely cause issues of the type you were initially seeing to have multiple Pythons installed. To rectify, you can delete one of them, but then you may need to run the labscript suite installer again in order for Python to be able to find the labscript suite modules (the labscript suite installer adds its install directory to the Python search path). Running the installer again will not overwrite or delete any changes you have made to configuration files or anything in the <labscript_suite_install_folder>/userlib directory.

Cheers,

Chris

Pierre Colombo

unread,
Feb 1, 2017, 3:43:37 AM2/1/17
to The labscript suite
Hi Chris, hi Philip,
Thanks for your help. I have configure the windows firewall to let the server run. Everything is working well.
Thanks again for your patience and help
Cheers, 
Pierre
Reply all
Reply to author
Forward
0 new messages