uproot.KeyInFileError
Defined in uproot.exceptions on line 16.
Inheritance order: |
---|
|
- 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
TDirectories
orTBranches
in uproot.behaviors.TBranch.HasBranches, which both have a PythonMapping
interface (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 aMapping
to raiseKeyError
, but it provides more information, depending on availability:because
: an explanatory messagecycle
: the ROOT cycle number requested, if anykeys
: a list or partial list of keys that are in the object, in case of misspellingfile_path
: a path (or URL) to the fileobject_path
: a path to the object within the ROOT file.