Skip to content
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

File-object separator colon parsing PR #976 must be fixed before the next release #1006

Closed
jpivarski opened this issue Oct 24, 2023 · 0 comments · Fixed by #1007
Closed

File-object separator colon parsing PR #976 must be fixed before the next release #1006

jpivarski opened this issue Oct 24, 2023 · 0 comments · Fixed by #1007
Assignees
Labels
bug The problem described is something that must be fixed

Comments

@jpivarski
Copy link
Member

In #976, the parsing that determines where a colon is between a file name and an object path was changed incorrectly: a basic (and important) use-case fails:

>>> import uproot
>>> tree = uproot.open("00376186-543E-E311-8D30-002618943857.root:Events")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jpivarski/irishep/uproot5/src/uproot/reading.py", line 143, in open
    file = ReadOnlyFile(
  File "/home/jpivarski/irishep/uproot5/src/uproot/reading.py", line 584, in __init__
    Source, file_path = uproot._util.file_path_to_source_class(
  File "/home/jpivarski/irishep/uproot5/src/uproot/_util.py", line 508, in file_path_to_source_class
    raise ValueError(f"URI scheme not recognized: {file_path}")
ValueError: URI scheme not recognized: 00376186-543E-E311-8D30-002618943857.root:Events

but

>>> tree = uproot.open("/tmp/00376186-543E-E311-8D30-002618943857.root:Events")

passes. The failing case is a relative local path; the successful case is an absolute local path.

I verified that 6b1952e (just before #976) passes but fdcbb8e (just after #976) fails.

@jpivarski jpivarski added the bug The problem described is something that must be fixed label Oct 24, 2023
@lobis lobis linked a pull request Oct 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The problem described is something that must be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants