From f7464e45dd22b886d373e6ee3b2d780403fe793d Mon Sep 17 00:00:00 2001 From: rettigl Date: Thu, 22 Feb 2024 23:06:18 +0100 Subject: [PATCH] remove redundant error messages --- pynxtools_mpes/reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pynxtools_mpes/reader.py b/pynxtools_mpes/reader.py index e4f6da6..58544bb 100644 --- a/pynxtools_mpes/reader.py +++ b/pynxtools_mpes/reader.py @@ -97,7 +97,7 @@ def h5_to_xarray(faddr: str, mode: str = "r") -> xr.DataArray: data = np.asarray(h5_file["binned"]["BinnedData"]) except KeyError as exc: raise ValueError( - f"Wrong Data Format, the BinnedData were not found. The error was{exc}.", + f"Wrong Data Format, the BinnedData was not found.", ) from exc # Reading the axes @@ -110,7 +110,7 @@ def h5_to_xarray(faddr: str, mode: str = "r") -> xr.DataArray: bin_names.append(h5_file["axes"][axis].attrs["name"]) except KeyError as exc: raise ValueError( - f"Wrong Data Format, the axes were not found. The error was {exc}", + f"Wrong Data Format, the axes were not found.", ) from exc # load metadata