diff --git a/tests/samples/issue404.root b/tests/samples/issue404.root new file mode 100644 index 00000000..e80388fa Binary files /dev/null and b/tests/samples/issue404.root differ diff --git a/tests/test_issues.py b/tests/test_issues.py index 2ebec4a5..d9572f26 100644 --- a/tests/test_issues.py +++ b/tests/test_issues.py @@ -246,3 +246,7 @@ def test_issue399(self): a = t["Histos.histograms1D"].array() for i in range(t.numentries): assert [x.title for x in a[i]] == [b"Primary Hits", b"Primary Loss", b"Energy Loss", b"Primary Hits per Element", b"Primary Loss per Element", b"Energy Loss per Element"] + + def test_issue404(self): + t = uproot.open("tests/samples/issue404.root")["Beam"] + assert t["Beam.GMAD::BeamBase.beamParticleName"].array().tolist() == [b"proton"] diff --git a/uproot/tree.py b/uproot/tree.py index 602a168c..b70d16cf 100644 --- a/uproot/tree.py +++ b/uproot/tree.py @@ -251,7 +251,7 @@ def _attachstreamer(self, branch, streamer, streamerinfosmap, isTClonesArray): members = streamerinfosmap[typename].members if members is not None: - for subbranch in branch._fBranches: + for subbranch in branch.itervalues(recursive=True): name = subbranch._fName if name.startswith(branch._fName + b"."): # drop parent branch's name name = name[len(branch._fName) + 1:] diff --git a/uproot/version.py b/uproot/version.py index 0ea7fdbd..c6f6b149 100644 --- a/uproot/version.py +++ b/uproot/version.py @@ -6,7 +6,7 @@ import re -__version__ = "3.10.11" +__version__ = "3.10.12" version = __version__ version_info = tuple(re.split(r"[-\.]", __version__))