From ef97d87e12d95daee62597fffdcde2c0dfe7d079 Mon Sep 17 00:00:00 2001 From: GuiMacielPereira Date: Thu, 23 Jan 2025 17:36:28 +0000 Subject: [PATCH] Check workspace is retrivable from ADS This simple change forces the ADS to check whether the workspace name i.e. load_result["DeadTimeTable"] actually exists. If it doesn't, it gives an error which is caught by the widget, instead of closing the widget and crashing mantid. Not an ideal solution, but a quick and simple one. --- .../mantidqtinterfaces/Muon/GUI/Common/utilities/load_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/utilities/load_utils.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/utilities/load_utils.py index e0a793830bbb..b5f7a40a50af 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/utilities/load_utils.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/utilities/load_utils.py @@ -246,7 +246,7 @@ def load_workspace_from_filename(filename, input_properties=DEFAULT_INPUTS, outp load_result["OutputWorkspace"] = [MuonWorkspaceWrapper(load_result["OutputWorkspace"])] run = int(workspace.getRunNumber()) - load_result["DataDeadTimeTable"] = load_result["DeadTimeTable"] + load_result["DataDeadTimeTable"] = AnalysisDataService.retrieve(load_result["DeadTimeTable"]).name() load_result["DeadTimeTable"] = None load_result["FirstGoodData"] = round(load_result["FirstGoodData"] - load_result["TimeZero"], 3)