Open
Description
Describe the bug
NanoEventsFactory is not able to read RNTuple NanoAOD file.
Environment:
awkward: 2.7.4
dask-awkward: 2025.2.0
uproot: 5.5.2
hist: 2.8.0
coffea: 2025.1.1
To Reproduce
Steps to reproduce the behavior:
- Use https://github.com/iris-hep/calver-coffea-agc-demo with latest uprtoot version 5.5.2 (which is fixing TypeError: Model_ROOT_3a3a_RNTuple.keys() got an unexpected keyword argument 'filter_branch' #1350) and change in cell 5 to switch to RNTuple file v1:
ttbar_file = "https://xrootd-local.unl.edu:1094//store/user/AGC/rntuple/rntuple-v1-128MiB/nanoAOD/ST_s-channel_4f_InclusiveDecays_13TeV-amcatnlo-pythia8/cmsopendata2015_single_top_s_chan_19394_PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1_00000_0000.root"
Output
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[3], line 3
1 ttbar_file = "https://xrootd-local.unl.edu:1094//store/user/AGC/rntuple/rntuple-v1-128MiB/nanoAOD/ST_s-channel_4f_InclusiveDecays_13TeV-amcatnlo-pythia8/cmsopendata2015_single_top_s_chan_19394_PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1_00000_0000.root"
----> 3 events = NanoEventsFactory.from_root({ttbar_file: "Events"}, schemaclass=NanoAODSchema).events()
5 # create the task graph to build a histogram
6 reconstructed_top_mass = calculate_trijet_mass(events)
File /usr/local/lib/python3.12/site-packages/coffea/nanoevents/factory.py:715, in NanoEventsFactory.events(self)
702 """
703 Build events
704
(...)
712 array of the events.
713 """
714 if self._is_dask:
--> 715 events = self._mapping(form_mapping=self._schema)
716 report = None
717 if isinstance(events, tuple):
File [/usr/local/lib/python3.12/site-packages/uproot/_dask.py:296](https://coffea.casa/usr/local/lib/python3.12/site-packages/uproot/_dask.py#line=295), in dask(files, filter_name, filter_typename, filter_branch, recursive, full_paths, step_size, steps_per_file, library, ak_add_doc, custom_classes, allow_missing, open_files, form_mapping, allow_read_errors_with_report, known_base_form, decompression_executor, interpretation_executor, **options)
277 return _get_dak_array(
278 files,
279 filter_name,
(...)
293 interpretation_executor,
294 )
295 else:
--> 296 return _get_dak_array_delay_open(
297 files,
298 filter_name,
299 filter_typename,
300 filter_branch,
301 recursive,
302 full_paths,
303 custom_classes,
304 allow_missing,
305 real_options,
306 interp_options,
307 form_mapping,
308 steps_per_file,
309 allow_read_errors_with_report,
310 known_base_form,
311 decompression_executor,
312 interpretation_executor,
313 )
314 else:
315 raise NotImplementedError()
File [/usr/local/lib/python3.12/site-packages/uproot/_dask.py:1616](https://coffea.casa/usr/local/lib/python3.12/site-packages/uproot/_dask.py#line=1615), in _get_dak_array_delay_open(files, filter_name, filter_typename, filter_branch, recursive, full_paths, custom_classes, allow_missing, real_options, interp_options, form_mapping, steps_per_file, allow_read_errors_with_report, known_base_form, decompression_executor, interpretation_executor)
1605 obj = uproot._util.regularize_object_path(
1606 ffile_path, fobject_path, custom_classes, allow_missing, real_options
1607 )
1608 common_keys = obj.keys(
1609 recursive=recursive,
1610 filter_name=filter_name,
(...)
1614 ignore_duplicates=True,
1615 )
-> 1616 base_form = _get_ttree_form(
1617 awkward, obj, common_keys, interp_options.get("ak_add_doc")
1618 )
1620 divisions = [0]
1621 partition_args = []
File [/usr/local/lib/python3.12/site-packages/uproot/_dask.py:1385](https://coffea.casa/usr/local/lib/python3.12/site-packages/uproot/_dask.py#line=1384), in _get_ttree_form(awkward, ttree, common_keys, ak_add_doc)
1383 for key in common_keys:
1384 branch = ttree[key]
-> 1385 content_form = branch.interpretation.awkward_form(ttree.file)
1386 if ak_add_doc:
1387 content_form = content_form.copy(parameters={"__doc__": branch.title})
AttributeError: 'RNTupleField' object has no attribute 'interpretation'
Additional context
@ariostas I opened this issue to be able to track progress