# PyRoot reading leaves

**URL:** <https://root-forum.cern.ch/t/pyroot-reading-leaves/45547>\
**Category:** Newbie\
**Tags:** tree\
**Created:** [June 25, 2021, 3:14am UTC](https://root-forum.cern.ch/t/pyroot-reading-leaves/45547 "2021-06-25T03:14:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![FoxWise](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/foxwise/32/37588_2.png) [@FoxWise](https://root-forum.cern.ch/u/FoxWise)\
**Post date:** [June 26, 2021, 6:07pm UTC](https://root-forum.cern.ch/t/pyroot-reading-leaves/45547/4 "2021-06-26T18:07:49Z")

</div>

Hi,

I stumbled on the same problem, you can check the post [here](https://root-forum.cern.ch/t/reading-branch-leafs-with-pyroot/43913)

you may want to try:

```auto
for entry in tree_file.Delphes:
    eta = entry.GetLeaf("Tower.Eta").GetValue()
    phi = entry.GetLeaf("Tower.Phi").GetValue()

```

I think this should work.

If not, try to upgrade to `root 6.22/06` .  
I think your method `eta = entry.Tower.Eta` also should work there, but I am not sure.

cheers

---

_[View the full topic](https://root-forum.cern.ch/t/pyroot-reading-leaves/45547)._
