-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Description
Tested on Windows 11, Anaconda Cloud developer install, pinning zeromq==4.3.4
Fresh install of labscript-suite, starting BLACS will give a one-time error on initialize:
This error will go away after a restart or recompile.
The logs:
2024-10-16 23:30:44,101 INFO BLACS: Qt enviroment: PyQt5
2024-10-16 23:30:44,101 INFO BLACS: PySide/PyQt version: 5.15.10
2024-10-16 23:30:44,101 INFO BLACS: Qt version: 5.15.2
2024-10-16 23:30:44,101 INFO BLACS: qtutils version: 3.1.0
2024-10-16 23:30:44,101 INFO BLACS: zprocess version: 2.25.0
2024-10-16 23:30:44,101 INFO BLACS: labscript_utils version: 3.4.0.dev22+gb042db4
2024-10-16 23:30:44,101 INFO BLACS: BLACS version: 3.3.0.dev8+g7a84e38
2024-10-16 23:30:44,844 INFO BLACS: About to load connection table: C:\Experiments\example_apparatus\connection_table.h5
2024-10-16 23:30:44,844 DEBUG BLACS.ConnectionTable: Parsing connection table from C:\Experiments\example_apparatus\connection_table.h5
2024-10-16 23:30:44,875 INFO BLACS: connection table loaded
2024-10-16 23:30:44,891 INFO BLACS: QApplication instantiated
2024-10-16 23:30:44,891 INFO BLACS: Loading BLACS ui
2024-10-16 23:30:44,984 INFO BLACS: BLACS ui loaded
2024-10-16 23:30:44,984 INFO BLACS: finding connected devices in connection table
2024-10-16 23:30:44,984 INFO BLACS: Loading front panel settings
2024-10-16 23:30:44,984 DEBUG BLACS.ConnectionTable: Parsing connection table from C:\Users\nicka\labscript-suite\app_saved_configs\example_apparatus\blacs\JPEnvy_BLACS.h5
2024-10-16 23:30:44,984 ERROR BLACS.ConnectionTable: could not open connection table dataset in C:\Users\nicka\labscript-suite\app_saved_configs\example_apparatus\blacs\JPEnvy_BLACS.h5
2024-10-16 23:30:45,000 ERROR BLACS: Got an exception:
Traceback (most recent call last):
File "C:\Users\nicka\anaconda3\envs\labscript\Lib\threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\nicka\anaconda3\envs\labscript\Lib\site-packages\zprocess\utils.py", line 122, in _reraise
raise value.with_traceback(traceback)
File "C:\Users\nicka\labscript-suite\labscript-utils\labscript_utils\connections.py", line 48, in __init__
dataset = hdf5_file['connection table']
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "h5py\\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py\\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "C:\Users\nicka\anaconda3\envs\labscript\Lib\site-packages\h5py\_hl\group.py", line 357, in __getitem__
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "h5py\\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py\\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\\h5o.pyx", line 241, in h5py.h5o.open
KeyError: "Unable to open object (object 'connection table' doesn't exist)"
My device name is JPEnvy, and so BLACS creates a file JPEnvy_BLACS.h5 in the app_saved_configs/ directory. The problem is that this is only created at either recompile of the connection_table.py -> connection_table.h5 or restart of BLACS, so upon initialization this file doesn't exist. One could get a similar error by simply deleting the {device}_BLACS.h5 file in app_saved_configs
Some options to try:
- Initialize and populate the {device}_BLACS.h5 file near runtime (force the file to exist earlier)
- Skip parsing and related operations if the file doesn't exist
- Delete the logic that requires parsing altogether, it seems like there are related functions that were made to try to store the information in this file to recover window parameters relate to the sizing, but ended up being superseded by PyQt logic. Some comments say these can be deleted (need to check this, may only be some of the functions such as blacs/main.py's restore_window)
Metadata
Metadata
Assignees
Labels
No labels
