diff --git a/Validation/src/Validation/_differ.py b/Validation/src/Validation/_differ.py index fe6ca1bd8..ab4adb2be 100644 --- a/Validation/src/Validation/_differ.py +++ b/Validation/src/Validation/_differ.py @@ -7,6 +7,7 @@ # external dependencies import matplotlib.pyplot as plt import matplotlib +import uproot # us from ._file import File @@ -110,7 +111,11 @@ def plot1d(self, column, xlabel, ax = fig.subplots() for f in self.files : - weights, bins, patches = f.plot1d(ax, column, **hist_kwargs) + try: + weights, bins, patches = f.plot1d(ax, column, **hist_kwargs) + except uproot.KeyInFileError: + f.log.warn(f"Key {column} doesn't exist in {self}, skipping") + continue ax.set_xlabel(xlabel) ax.set_ylabel(ylabel)