-
Couldn't load subscription status.
- Fork 84
Fix: Handle malformed TLeaf titles to prevent crash with warning #1501
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
Open
dan-k-k
wants to merge
3
commits into
scikit-hep:main
Choose a base branch
from
dan-k-k:changes1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+11
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Thank you @dan-k-k! It seems like this is a common occurrence, so let's not even bother showing the warning (which is what's causing the tests to fail). |
|
Done. Thanks for the feedback. |
|
@dan-k-k - Please, let us know if you are still working on this PR? There are several tests that are failing: FAILED tests/test_0023_more_interpretations_1.py::test_double32_2 - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0023_more_interpretations_1.py::test_double32_3 - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0034_generic_objects_in_ttrees.py::test_jagged_awkward_1 - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0053_parents_should_not_be_bases.py::test_TRefArray - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0053_parents_should_not_be_bases.py::test_awkward_TRefArray - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0087_memberwise_splitting_not_implemented_messages.py::test_issue510b - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0438_TClonesArray_is_not_AsGrouped.py::test - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0442_regular_TClonesArray.py::test_read_delphes_np - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0442_regular_TClonesArray.py::test_read_delphes_ak - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0610_awkward_form.py::test_awkward_array_tref_array_forth - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_01[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_01[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_02[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_02[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_23[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_23[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_24[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_24[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_25[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_25[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_26 - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_27[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_27[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_28[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_28[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_30[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_30[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_51[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_51[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_52[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_52[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_53[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_53[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_54[False] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_0637_setup_tests_for_AwkwardForth.py::test_54[True] - uproot.interpretation.identify.NotNumerical
FAILED tests/test_1114_fix_attempt_to_concatenate_numpy_with_awkward.py::test_partially_fix_issue_951 - uproot.interpretation.identify.NotNumerical
FAILED tests/test_1189_dask_failing_on_duplicate_keys.py::test_dask_duplicated_keys - uproot.interpretation.identify.NotNumerical |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #1498.
This PR resolves a ValueError that occurs when reading branches with a specific type of malformed metadata: a TLeaf that has a fixed dimension in its title (e.g., BranchName[102]) but is also designated as a jagged array via fLeafCount. The original logic in _from_leaves would incorrectly parse the fixed dimension, leading to a crash during data reshaping.
This fix adds a check at the top of the interpretation_of function to specifically detect this pattern. When found, it bypasses the faulty logic and returns a simple jagged array interpretation, allowing the file to be read correctly. This also resolves the issue for many other similarly malformed branches in the test file.