Blacs fails to open

138 views
Skip to first unread message

Eric Norrgard

unread,
Apr 27, 2021, 3:39:33 PM4/27/21
to the labscript suite
Hi all,

I've encountered a strange bug where upon opening blacs, I see the usual preamble text "importing h5lock and h5py, importing labscript suite, modules creating device tabs".  Then the blacs gui starts to load with a blank screen for a few seconds, and then the whole thing crashes.

I've tried restarting the PC a few times and closing all open instances of Python in the Task Manager, but neither seems to do much good.

I've attached  the recent blacs log file in case this is of any use.  Any suggestions?

Thanks,
Eric
BLACS.log

dihm....@gmail.com

unread,
Apr 27, 2021, 4:49:45 PM4/27/21
to the labscript suite
Hi Eric,

Thanks for uploading the log file. Unfortunately, it doesn't seem like the error shows up in the log. You can typically get a bit more information about errors like this by starting blacs from the command line, since many errors will show there and not in the log. You do this by starting a shell in your labscript environment and running `python -m blacs`. Hopefully that output will say something a bit more useful.

-David

Eric Norrgard

unread,
Apr 27, 2021, 4:59:32 PM4/27/21
to the labscript suite
Hi David,

Thanks for the quick response!  The command line is in fact throwing some int/float error related to the gui that plausibly is the culprit.  I can't quite tell what it is getting at, maybe windows is telling the window to be a non-integer pixel size?  See below.

Best,
Eric


====


(base) C:\>conda activate py38

(py38) C:\>python -m blacs
2021-04-27 16:54:21,401 INFO BLACS: Python version 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
2021-04-27 16:54:21,401 INFO BLACS: Platform: win32
2021-04-27 16:54:21,401 INFO BLACS: windows version: sys.getwindowsversion(major=10, minor=0, build=18363, platform=2, service_pack='')
2021-04-27 16:54:21,401 INFO BLACS: PyZMQ version: 20.0.0
2021-04-27 16:54:21,401 INFO BLACS: ZMQ version: 4.3.3
2021-04-27 16:54:21,401 INFO BLACS: h5py version: Summary of the h5py configuration
---------------------------------

h5py    2.10.0
HDF5    1.10.4
Python  3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
sys.platform    win32
sys.maxsize     9223372036854775807
numpy   1.19.2

2021-04-27 16:54:21,401 INFO BLACS: Qt enviroment: PyQt5
2021-04-27 16:54:21,401 INFO BLACS: PySide/PyQt version: 5.9.2
2021-04-27 16:54:21,401 INFO BLACS: Qt version: 5.9.7
2021-04-27 16:54:21,401 INFO BLACS: qtutils version: 3.0.0
2021-04-27 16:54:21,401 INFO BLACS: zprocess version: 2.20.1
2021-04-27 16:54:21,401 INFO BLACS: labscript_utils version: 3.2.0.dev8+g4581953.d20210427
2021-04-27 16:54:21,411 INFO BLACS: BLACS version: 3.0.0rc2.dev14+g348bbeb
2021-04-27 16:54:23,303 INFO BLACS: About to load connection table: C:\Experiments\PRIME\connection_table.h5
2021-04-27 16:54:23,313 INFO BLACS: connection table loaded
2021-04-27 16:54:23,313 INFO BLACS: QApplication instantiated
2021-04-27 16:54:23,313 INFO BLACS: Loading BLACS ui
2021-04-27 16:54:23,403 INFO BLACS: BLACS ui loaded
2021-04-27 16:54:23,403 INFO BLACS: finding connected devices in connection table
2021-04-27 16:54:23,403 INFO BLACS: Loading front panel settings
2021-04-27 16:54:23,473 INFO BLACS: restoring window data
2021-04-27 16:54:23,473 WARNING BLACS: c:\labscript-suite\blacs\blacs\__main__.py:465: DeprecationWarning: an integer is required (got type numpy.float64).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self.ui.move(tab_data['BLACS settings']["window_xpos"]-tab_data['BLACS settings']['window_frame_width']/2,tab_data['BLACS settings']["window_ypos"]-tab_data['BLACS settings']['window_frame_height']+tab_data['BLACS settings']['window_frame_width']/2)

c:\labscript-suite\blacs\blacs\__main__.py:465: DeprecationWarning: an integer is required (got type numpy.float64).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self.ui.move(tab_data['BLACS settings']["window_xpos"]-tab_data['BLACS settings']['window_frame_width']/2,tab_data['BLACS settings']["window_ypos"]-tab_data['BLACS settings']['window_frame_height']+tab_data['BLACS settings']['window_frame_width']/2)
2021-04-27 16:54:23,553 INFO BLACS: Creating tab widgets
2021-04-27 16:54:23,553 INFO BLACS: Instantiating devices
2021-04-27 16:54:23,553 INFO BLACS: instantiating Camera_1
2021-04-27 16:54:25,063 INFO BLACS: instantiating Camera_2
2021-04-27 16:54:25,191 INFO BLACS: instantiating Laser_Frequencies
2021-04-27 16:54:28,251 WARNING BLACS: c:\labscript-suite\labscript-devices\labscript_devices\LaserTCPIPLock.py:23: UserWarning: @labscript_device decorator is unnecessary and can be removed
  class LaserTCPIPLock(Device):

c:\labscript-suite\labscript-devices\labscript_devices\LaserTCPIPLock.py:23: UserWarning: @labscript_device decorator is unnecessary and can be removed
  class LaserTCPIPLock(Device):
2021-04-27 16:54:28,251 WARNING BLACS: c:\labscript-suite\labscript-devices\labscript_devices\LaserTCPIPLock.py:143: UserWarning: @BLACS_worker decorator is unnecessary and can be removed
  class LaserTCPIPLockWorker(Worker):

c:\labscript-suite\labscript-devices\labscript_devices\LaserTCPIPLock.py:143: UserWarning: @BLACS_worker decorator is unnecessary and can be removed
  class LaserTCPIPLockWorker(Worker):
2021-04-27 16:54:28,534 INFO BLACS: instantiating MicroMaestro6
2021-04-27 16:54:28,561 WARNING BLACS: c:\labscript-suite\labscript-devices\labscript_devices\Maestro.py:45: UserWarning: @labscript_device decorator is unnecessary and can be removed
  class Maestro(Device):

c:\labscript-suite\labscript-devices\labscript_devices\Maestro.py:45: UserWarning: @labscript_device decorator is unnecessary and can be removed
  class Maestro(Device):
Made it to initialise_GUI!!!
2021-04-27 16:54:28,679 INFO BLACS: instantiating MultiHarp150
2021-04-27 16:54:28,701 WARNING BLACS: c:\labscript-suite\labscript-devices\labscript_devices\MultiHarp.py:69: UserWarning: @labscript_device decorator is unnecessary and can be removed
  class MultiHarp(TriggerableDevice):

c:\labscript-suite\labscript-devices\labscript_devices\MultiHarp.py:69: UserWarning: @labscript_device decorator is unnecessary and can be removed
  class MultiHarp(TriggerableDevice):
Made it to initialise_GUI!!!
2021-04-27 16:54:28,791 INFO BLACS: instantiating pulseblaster
2021-04-27 16:54:28,851 INFO BLACS: Instantiating plugins
2021-04-27 16:54:28,861 INFO BLACS: creating plugin tabs
2021-04-27 16:54:28,861 INFO BLACS: reordering tabs
2021-04-27 16:54:28,881 INFO BLACS: starting analysis submission thread
2021-04-27 16:54:28,891 INFO BLACS: starting queue manager thread
2021-04-27 16:54:28,901 INFO BLACS.queue_manager.thread: starting
2021-04-27 16:54:28,911 INFO BLACS: setting up notification system
2021-04-27 16:54:28,951 INFO BLACS: setting up preferences system
2021-04-27 16:54:29,011 INFO BLACS.plugin.connection_table: Using hashable_types: ['.py', '.txt', '.ini', '.json']; polling_interval: 1.0
2021-04-27 16:54:29,101 INFO BLACS: hiding easter eggs
2021-04-27 16:54:29,101 INFO BLACS: showing UI
2021-04-27 16:54:29,101 INFO BLACS: BLACS instantiated

(py38) C:\>

David Meyer

unread,
Apr 27, 2021, 5:23:44 PM4/27/21
to labscri...@googlegroups.com
Hmm, so this is basically exactly what was in your log. And while those float/int warnings are probably going to be an issue eventually (when whatever package is throwing the deprecation warning finally deprecates that implicit type cast) it shouldn't necessarily be the problem now.

A quick thought to try right now, without me thinking very hard about it, is to reset your BLACS layout configuration. This is done by going to your app_saved_configs folder for your experiment and renaming/deleting the h5 file in the blacs subfolder (do this with blacs closed). On reload all of your tabs and other visual settings will be reset. Sometimes a corruption of this file can cause difficult-to-diagnose bugs.

-David


--
You received this message because you are subscribed to a topic in the Google Groups "the labscript suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/labscriptsuite/G396NLMfTSM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to labscriptsuit...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/labscriptsuite/4f74293b-3bb8-48b5-a88d-29a14ddda1e5n%40googlegroups.com.

Eric Norrgard

unread,
Apr 27, 2021, 5:30:45 PM4/27/21
to the labscript suite
That did the trick, thank you!  I will keep this in mind for future trouble shooting.

David Meyer

unread,
Apr 27, 2021, 5:40:53 PM4/27/21
to labscri...@googlegroups.com
Awesome! It's always a pleasant surprise when I can correctly diagnose something as fast as Chris.

Happy Experimenting!
-David


Zak V

unread,
Apr 27, 2021, 5:42:56 PM4/27/21
to the labscript suite
Hi Eric, David,

Glad you got the issue worked out!

I believe this is the same issue mentioned in the mailing list here and here and discussed on the related github issue here. If you run into this issue again you may want to try the workaround described on the related github issue in this comment as it avoids deleting your configuration settings. Alternatively,  this bug was also recently patched in the development version of blacs. So if you have a developer install of blacs you should be able to fix/avoid this issue by pulling in the latest changes.

Cheers,
Zak
Reply all
Reply to author
Forward
0 new messages