labscript-suite-temp-2 / runmanager

runmanager is a graphical user interface (GUI) used to aid the compilation of labscript experiment scripts into hardware instructions to be executed on the hardware. Experiment parameters can be adjusted in the GUI, and lists of parameters can be used to create sequences of experiments, and scan over complex parameter spaces.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Error opening runmanager #51

Closed philipstarkey closed 6 years ago

philipstarkey commented 6 years ago

Original report (archived issue) by Julia Cline (Bitbucket: julia_cline).


I am new to labscript, so this may be a silly issue. When I try running runmanager, it gives me an error. I think that it is a problem with importing QtGui and QtWidgets. Here is the full text of the error:

Traceback (most recent call last): File "C:\labscript_suite\runmanager__main.py", line 46, in check_version('qtutils', '2.0.0', '3.0.0') File "C:\labscript_suite\labscript_utils__init.py", line 84, in check_version _reraise(exc_info) File "C:\labscript_suite\labscript_utils__init__.py", line 62, in _reraise exec('raise type, value, traceback', globals(), locals()) File "C:\labscript_suite\labscript_utils\init.py", line 47, in _get_version module = import__(module_name) File "C:\Users\thomp\Anaconda2\lib\site-packages\qtutils\init__.py", line 23, in from qtutils.qt.QtCore import qInstallMessageHandler File "C:\Users\thomp\Anaconda2\lib\site-packages\qtutils\qt.py", line 82, in from PyQt5 import QtGui, QtCore, QtWidgets ImportError: DLL load failed: The specified procedure could not be found.

philipstarkey commented 6 years ago

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


This sounds like it might be a problem with PyQt5 or the way PyQt5 is installed. Are you able to import PyQt5 by itself, by running the same import line as in the exception

#!python

from PyQt5 import QtGui, QtCore, QtWidgets

by itself in a Python interactive interpreter or script?

If this raises the same error, there might be a problem with your PyQt5 installation. I can see you're using Anaconda 2, which as far as I know comes with PyQt5 already set up nicely, at least in recent versions. Did you by any chance do anything like trying to install PyQt5 from another source, or is it perhaps an old Anaconda installation? Are you running 64 bit Windows, and it is a 64 bit installation of Python? If you don't know the latter you can find out by running:

#!python

import struct;print struct.calcsize("P") * 8

This might be useful to know because a mismatch between 32 bit and 64 bit between PyQt5 and Python might lead to the error you're seeing.

If you can import PyQt5 fine from a python interpreter then there might be some problem with the environment as seen by runmanager, and then I can investigate that.

philipstarkey commented 6 years ago

Original comment by Julia Cline (Bitbucket: julia_cline).


Hi Chris,

Thank you for your reply!

The PyQt5 I had came with Anaconda2. I was running the 64 bit version of Python on a 64 bit Windows machine. When I tried to run

#!python
from PyQt5 import QtGui, QtCore, QtWidgets

in a Python interpreter, it gave an error that the DLL load failed. To fix it, I uninstalled and reinstalled Anaconda2 and it currently seems to work. I suspect that when I downloaded Anaconda the first time, I clicked the automatic version, rather than the "64-Bit Graphical Installer (500 MB)" version. Perhaps I did not have a 64 bit version of PyQt5.

Now that PyQt5 works, I can open all the programs except for blacs, which is giving an error "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)" When I navigate to the folder, it has only blue_mot.h5, gen2.h5, and a folder named example. Perhaps I am also missing something simple here? Should I post an issue in blacs?

philipstarkey commented 6 years ago

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


Excellent!

Now there is no problem other than BLACS not behaving ideally when there is no connection table. There is already a bug filed to improve the user experience here - it would be better if it actually told you what was going on or popped up a dialog to allow you to compile a connection table.

Anyway, what you need to do is create a connection table python file, compile it with runmanager, and rename the resulting h5 file and put it in the location BLACS expects. This is documented here, in the documentation for BLACS, in the 'initial setup' section:

https://bytebucket.org/labscript_suite/blacs/raw/default/docs/UsingBLACS.pdf

Let me know if anything isn't clear or if you have any more questions about it.

philipstarkey commented 6 years ago

Original comment by Julia Cline (Bitbucket: julia_cline).


Great, thanks!

philipstarkey commented 6 years ago

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