diff --git a/doc/changelog.rst b/doc/changelog.rst index ccf912b68b509a0306ecf3eba12f70ae24d5652c..36fe408f9872f82a3f056c6d436ffc1154e3ed6b 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -24,7 +24,7 @@ unreleased - Mnemonics for XRD devices :mr:`208` - Add function to align OL to FEL pulse Id :mr:`218` - Add reflectivity routine :mr:`218` - - Possibility to extract run values of mnemonics :mr:`220` + - Possibility to extract run values of mnemonics :mr:`220`, :mr:`232` - Add get_undulator_config function :mr:`225` 1.6.0 diff --git a/src/toolbox_scs/load.py b/src/toolbox_scs/load.py index be22e18ba09dfccbab4c4ccf10baa7e7897f80ea..2673cb40473ebbcdafbe3ca1559839ca9c904c48 100644 --- a/src/toolbox_scs/load.py +++ b/src/toolbox_scs/load.py @@ -458,9 +458,13 @@ def load_run_values(prop_or_run, runNB=None, which='mnemonics'): run_values = {} for m in mnemos: val = None - if mnemos[m]['source'] in run.control_sources: - val = run.get_run_value(mnemos[m]['source'], - mnemos[m]['key']) + try: + if mnemos[m]['source'] in run.control_sources: + val = run.get_run_value(mnemos[m]['source'], + mnemos[m]['key']) + except Exception as e: + log.info(f'Error while retrieving {m} mnemonic: {e}') + continue run_values[m] = val return run_values