Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions runviewer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import pprint
import signal
import concurrent.futures
import traceback

splash.update_text('importing labscript suite modules')
from labscript_utils.setup_logging import setup_logging
Expand Down Expand Up @@ -762,6 +763,7 @@ def on_shot_selection_changed(self, item):
self.on_toggle_shutter(item.checkState(), current_shot)

def load_shot(self, filepath):
logger.info(f'loading run from {filepath:s}')
shot = Shot(filepath)

# add shot to shot list
Expand Down Expand Up @@ -1533,7 +1535,7 @@ def add_shutter_times(self, shutters):

def _load_device(self, device, clock=None):
try:
print('loading %s' % device.name)
logger.info('loading %s' % device.name)
module = device.device_class
# Load the master pseudoclock class
device_class = device_registry.get_runviewer_parser(module)
Expand All @@ -1545,15 +1547,14 @@ def _load_device(self, device, clock=None):
for grandchild_device_name, grandchild_device in child_device.child_list.items():
self._load_device(grandchild_device, trace)

except Exception:
# TODO: print/log exception traceback
# if device.name == 'ni_card_0' or device.name == 'pulseblaster_0' or device.name == 'pineblaster_0' or device.name == 'ni_card_1' or device.name == 'novatechdds9m_0':
# raise
# raise
except Exception as e:

if hasattr(device, 'name'):
print('Failed to load device %s' % device.name)
logger.info(f'Failed to load device {device.name:s}, exception was:\n'+
''.join(traceback.format_exception(type(e), e, e.__traceback__)))
else:
print('Failed to load device (unknown name, device object does not have attribute name)')
logger.info('Failed to load device (unknown name, device object does not have attribute name), exception was:\n'+
''.join(traceback.format_exception(type(e), e, e.__traceback__)))

# backwards compat
with h5py.File(self.path, 'r') as file:
Expand Down