diff --git a/src/mslice/models/workspacemanager/file_io.py b/src/mslice/models/workspacemanager/file_io.py index cdd20733..b5700a9d 100644 --- a/src/mslice/models/workspacemanager/file_io.py +++ b/src/mslice/models/workspacemanager/file_io.py @@ -270,9 +270,12 @@ def _get_slice_mdhisto_xye(histo_ws): def _output_data_to_ascii(output_path, out_data, header): - np.savetxt( - _to_absolute_path(str(output_path)), out_data, fmt="%12.9e", header=header - ) + try: + np.savetxt( + _to_absolute_path(str(output_path)), out_data, fmt="%12.9e", header=header + ) + except OSError as e: + raise RuntimeError(f"Error occurred: {e}") def _to_absolute_path(filepath: str) -> str: diff --git a/src/mslice/util/mantid/algorithm_wrapper.py b/src/mslice/util/mantid/algorithm_wrapper.py index 61c982d6..1b7fa4f0 100644 --- a/src/mslice/util/mantid/algorithm_wrapper.py +++ b/src/mslice/util/mantid/algorithm_wrapper.py @@ -129,6 +129,5 @@ def remove_from_ads(workspacename): if AnalysisDataService.Instance().doesExist(hiddenworkspace): AnalysisDataService.Instance().remove(hiddenworkspace) hiddenworkspace = "__MSL" + workspacename + "_HIDDEN" - print(AnalysisDataService.Instance().getObjectNames()) if AnalysisDataService.Instance().doesExist(hiddenworkspace): AnalysisDataService.Instance().remove(hiddenworkspace)