diff --git a/script/local.py b/script/local.py index b0b8d684..b844fa49 100644 --- a/script/local.py +++ b/script/local.py @@ -214,10 +214,13 @@ def append_diag_datasets(parent = None): parent = get_exec_pars().group group = parent + "attrs/" for f in diag_channels: - x = f.read() - if x is None: - x = '' if (type(f) is ch.psi.pshell.epics.ChannelString) else float('nan') - append_dataset(group+get_diag_name(f), x) + try: + x = f.read() + if x is None: + x = '' if (type(f) is ch.psi.pshell.epics.ChannelString) else float('nan') + append_dataset(group+get_diag_name(f), x) + except: + log("Error sampling " + str(get_diag_name(f)) + ": " + str(sys.exc_info()[1])) def wait_beam():