Defined in uproot.exceptions on line 15.
- class uproot.exceptions.KeyInFileError(key, because='', cycle=None, keys=None, file_path=None, object_path=None)
Exception raised by attempts to find ROOT objects in
TBranchesin uproot.behaviors.TBranch.HasBranches, which both have a Python
Mappinginterface (square bracket syntax to extract items).
This exception descends from Python’s
KeyError, so it can be used in the normal way by interfaces that expect a missing item in a
KeyError, but it provides more information, depending on availability:
because: an explanatory message
cycle: the ROOT cycle number requested, if any
keys: a list or partial list of keys that are in the object, in case of misspelling
file_path: a path (or URL) to the file
object_path: a path to the object within the ROOT file.