Skip to content

Root files that have .1 apaended to name fail to open #6

@gordonwatts

Description

@gordonwatts

The following query:

calratio_x_dsname = "mc16_13TeV:mc16_13TeV.311425.MGPy8EG_A14NNPDF23_NNPDF31ME_HSS_LLP_mH1000_mS50.deriv.DAOD_EXOT15.e7357_e5984_s3234_r10201_r10210_p4696_tid26710934_00"

# Because we aren't running calibrations for tracks, I hope R25 code works on this!
from func_adl_servicex_xaodr25 import FuncADLQueryPHYSLITE

query = FuncADLQueryPHYSLITE().SelectMany(
    lambda e: e.TrackParticles("InDetTrackParticles").Select(
        lambda t: {"pt": t.pt(), "eta": t.eta()}
    )
)

from servicex import ServiceXSpec, Sample, dataset, deliver
from servicex_analysis_utils import to_awk

ds = dataset.Rucio(calratio_x_dsname)
spec = ServiceXSpec(
    Sample=[
        Sample(
            Name="HSS_1000_50",
            Dataset=ds,
            Query=query,  # type: ignore
            Codegen="atlasr22",
        ),
    ],
)

from calratio_training_data.training_query import run_query

result = to_awk(deliver(spec))

Fails:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[10], line 29
     16 spec = ServiceXSpec(
     17     Sample=[
     18         Sample(
   (...)     24     ],
     25 )
     27 from calratio_training_data.training_query import run_query
---> 29 result = to_awk(deliver(spec))

File ~/code/atlas/sx_training_fetch/.venv/lib/python3.13/site-packages/servicex_analysis_utils/materialization.py:60, in to_awk(deliver_dict, dask, iterator, **kwargs)
     57     is_root=False 
     58     # ServiceX supports only root/parquet in transformed files
     59 else:
---> 60     raise ValueError(f"Unsupported file format: '{paths[0]}'. Files must be ROOT (.root) or Parquet (.parquet, .pq)")
     62 try:
     63     if dask:

ValueError: Unsupported file format: '/tmp/servicex_gwatts/25ae404f-65b1-43a9-b04e-ba4170e59259/root___c029.af.uchicago.edu_1094__root___xrootd.lcg.triumf.ca_1094__atlas_atlasdatadisk_rucio_mc16_13TeV_2c_e4_DAOD_EXOT15.26710934._000014.pool.root.1'. Files must be ROOT (.root) or Parquet (.parquet, .pq)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions