Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Unable to read vector<long long>/vector<Long64_t> branches #507

Description

@masonproffitt

The type std::vector<long long> (or std::vector<Long64_t>) is missing from uproot's type interpretation:

>>> import uproot
>>> file = uproot.open('test_file.root')
>>> file['tree']['long64_t_vector_branch']
<TBranchElement b'long64_t_vector_branch' at 0x7f87add58250>
>>> file['tree']['long64_t_vector_branch'].array()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/uproot/tree.py", line 1362, in array
    interpretation = self._normalize_interpretation(interpretation, awkward)
  File "/usr/lib/python3.8/site-packages/uproot/tree.py", line 1105, in _normalize_interpretation
    raise ValueError("cannot interpret branch {0} as a Python type\n   in file: {1}".format(repr(self.name), self._context.sourcepath))
ValueError: cannot interpret branch b'long64_t_vector_branch' as a Python type
   in file: /home/user/cern/iris/code/uproot_tree_utils/test_file.root

The type is missing in uproot/interp/auto.py. unsigned long long/ULong64_t works fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions