Skip to content

Commit 8c27b5e

Browse files
committed
Merge branch 'master' into carterturn-dropdown-cleaning
2 parents c15fc9f + 9387465 commit 8c27b5e

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

readthedocs.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
# Required
55
version: 2
66

7+
# Set build environment options
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
713
# Build documentation in the docs/ directory with Sphinx
814
sphinx:
915
builder: dirhtml
@@ -15,9 +21,8 @@ formats:
1521
- pdf
1622
- epub
1723

18-
# Optionally set the version of Python and requirements required to build your docs
24+
# Optionally set the requirements required to build your docs
1925
python:
20-
version: 3.7
2126
install:
2227
- method: pip
2328
path: .

runviewer/__main__.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import pprint
3535
import signal
3636
import concurrent.futures
37+
import traceback
3738

3839
splash.update_text('importing labscript suite modules')
3940
from labscript_utils.setup_logging import setup_logging
@@ -765,6 +766,7 @@ def on_shot_selection_changed(self, item):
765766
self.on_toggle_shutter(item.checkState(), current_shot)
766767

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

770772
# add shot to shot list
@@ -1536,7 +1538,7 @@ def add_shutter_times(self, shutters):
15361538

15371539
def _load_device(self, device, clock=None):
15381540
try:
1539-
print('loading %s' % device.name)
1541+
logger.info('loading %s' % device.name)
15401542
module = device.device_class
15411543
# Load the master pseudoclock class
15421544
device_class = device_registry.get_runviewer_parser(module)
@@ -1548,15 +1550,14 @@ def _load_device(self, device, clock=None):
15481550
for grandchild_device_name, grandchild_device in child_device.child_list.items():
15491551
self._load_device(grandchild_device, trace)
15501552

1551-
except Exception:
1552-
# TODO: print/log exception traceback
1553-
# 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':
1554-
# raise
1555-
# raise
1553+
except Exception as e:
1554+
15561555
if hasattr(device, 'name'):
1557-
print('Failed to load device %s' % device.name)
1556+
logger.info(f'Failed to load device {device.name:s}, exception was:\n'+
1557+
''.join(traceback.format_exception(type(e), e, e.__traceback__)))
15581558
else:
1559-
print('Failed to load device (unknown name, device object does not have attribute name)')
1559+
logger.info('Failed to load device (unknown name, device object does not have attribute name), exception was:\n'+
1560+
''.join(traceback.format_exception(type(e), e, e.__traceback__)))
15601561

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

0 commit comments

Comments
 (0)