Skip to content

Commit

Permalink
remove redundant error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Feb 22, 2024
1 parent 54e12b5 commit f7464e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pynxtools_mpes/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f7464e4

Please sign in to comment.