-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: too many colons in file path #1038
Comments
Hello @matthewfeickert , We have been trying to simplify how paths are handled by uproot with the goal of delegating as much responsibility as possible to fsspec. We tried to maintain support for all previous usages but it appears we didn't cover all cases. I'll add a test with this particular url to make sure it keeps working in the future. (sorry for the troubles!) This particular path you are posting will be correctly processed after 0ace10af972ba825d98c28fa7df97cd3ef0b480f wh. However this PR is not yet available in the The new naming scheme is pretty simple:
In this particular case it looks like there are two scheme ( If it doesn't work you could also try to use the |
Thanks @lobis. Yeah, after installing from 0ace10a and installing $ docker run --rm -ti sslhep/analysis-dask-base:latest /bin/bash
Configured GCC from: /opt/lcg/gcc/11.2.0-8a51a/x86_64-centos7/bin/gcc
Configured AnalysisBase from: /usr/AnalysisBase/24.2.26/InstallArea/x86_64-centos7-gcc11-opt
Configured PyColumnarPrototype from: /usr/tools/PyColumnarPrototypeDemo/1.0.0/InstallArea/x86_64-centos7-gcc11-opt
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > python -m pip --quiet uninstall --yes uproot
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > python -m pip --quiet install --upgrade git+https://github.com/scikit-hep/uproot5.git@0ace10af972ba825d98c28fa7df97cd3ef0b480f
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > python -m pip show uproot
Name: uproot
Version: 5.2.0rc1
Summary: ROOT I/O in pure Python and NumPy.
Home-page:
Author:
Author-email: Jim Pivarski <[email protected]>
License:
Location: /venv/lib/python3.9/site-packages
Requires: awkward, fsspec, numpy, packaging, typing-extensions
Required-by: coffea
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > python -m pip install --upgrade fsspec-xrootd
Collecting fsspec-xrootd
Downloading fsspec_xrootd-0.2.2-py3-none-any.whl.metadata (4.1 kB)
Requirement already satisfied: fsspec in /venv/lib/python3.9/site-packages (from fsspec-xrootd) (2023.10.0)
Downloading fsspec_xrootd-0.2.2-py3-none-any.whl (11 kB)
Installing collected packages: fsspec-xrootd
Successfully installed fsspec-xrootd-0.2.2
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > kinit [email protected]
Password for [email protected]:
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: [email protected]
Valid starting Expires Service principal
11/21/23 09:02:28 11/22/23 10:02:19 krbtgt/[email protected]
renew until 11/26/23 09:02:19
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > vi test.py
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > python -i test.py
uproot version: 5.2.0rc1
XRootD Python bindings version: 5.4.3
>>> file
<ReadOnlyDirectory '/' at 0x7f3c1c2bba30>
>>> len(file["CollectionTree"].keys())
941
>>>
(venv) [bash][atlas AnalysisBase-24.2.26]:analysis > So we'll be on the lookout for |
* Install a precursor to uproot v5.2.0rc2 from GitHub and install fsspec-xrootd to provide support for xrootd access from uproot. - c.f. scikit-hep/uproot5#1038 - Note: This should be changed to an install from PyPI as soon as a release candidate is available for stability/reproducibility. * Rebuild lock file.
Out of curiosity, would |
Yes, this will also work and it's the most robust way to specify the object inside the file. In this case there are no restrictions that the file name needs to end in .root |
So about possible paths...
Best, |
Another issue is opening more than one file: import uproot
xc='root://xcache.af.uchicago.edu:1094//'
fname_data = xc+"root://fax.mwt2.org:1094//pnfs/uchicago.edu/atlaslocalgroupdisk/rucio/data18_13TeV/df/a4/DAOD_PHYSLITE.34858087._000001.pool.root.1"
fname_dat1 = xc+"root://fax.mwt2.org:1094//pnfs/uchicago.edu/atlaslocalgroupdisk/rucio/data18_13TeV/6c/67/DAOD_PHYSLITE.34858087._000002.pool.root.1"
tree_data = uproot.iterate(
{fname_data: "CollectionTree"}, {fname_dat1: "CollectionTree"}
)
next(tree_data) # trigger error ValueError: cannot produce Awkward Arrays for interpretation AsObjects(Unknown_xAOD_3a3a_MissingETAssociationMap_5f_v1) because
xAOD::MissingETAssociationMap_v1
instead, try library="np" rather than library="ak" or globally set uproot.default_library
in file root://xcache.af.uchicago.edu:1094//root://fax.mwt2.org:1094//pnfs/uchicago.edu/atlaslocalgroupdisk/rucio/data18_13TeV/df/a4/DAOD_PHYSLITE.34858087._000001.pool.root.1
in object /CollectionTree;1:METAssoc_AnalysisMET The same happens even if I try to open single file using iterator... |
I will leave this issue open in case anyone runs into the same error. It will be fixed by #1022 which will be available in the next release ( |
Hi. So this might be more of an XRootD issue than an
upoort
one, but from the "Opening a file" docs I'm not sure what the limits are so I thought I'd ask.I don't have a great public minimal reproducible example yet, so I'll just share the example that @ivukotic found today and sent me. In this example there is one (of many) ROOT files on the UChicago Analysis Facility that we're able to read using XRootD from inside of a Docker container (
sslhep/analysis-dask-base:latest
) that provides the base environment for the k8 pod that is serving the user a Jupyter Lab environment. This environment hasuproot
v5.1.2
and XRootD Python bindings in it but when we try to open the file in the followingtest.py
we error out with
Full example here, but this requires the user to have ATLAS credentials here:
Can you provide any details on if there's revisions to the naming scheme that we'll need to use or if there's something we did wrong?
Let me work on this. Maybe @ivukotic can temporarily move the file to a public area?
cc @alexander-held and @oshadura in the event that they came across similar issues with the IRIs-HEP Analysis Grand challenge before.
The text was updated successfully, but these errors were encountered: