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

fix: don't require Form JSON to have 'parameters' #1245

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

jpivarski
Copy link
Member

Maybe this form is specially constructed to always have a "parameters" key, but the general protocol for Awkward Form JSON doesn't require it. Thus, this PR replaces every attempt to extract form["parameters"] with form.get("parameters", {}). All of these cases are in the object → Awkward conversion that only runs if AwkwardForth failed to run. (It's the Uproot 4.x code, left in as a fallback if the much faster Uproot 5.x workflow doesn't work.)

The fundamental cause of #1244 might be inconsistent construction of that form (a corner case that fails to add the "parameters" key), and rather than fixing that at the producer end, this PR fixes it on the consumer end.

@jpivarski jpivarski linked an issue Jul 5, 2024 that may be closed by this pull request
@jpivarski jpivarski merged commit aaf2396 into main Jul 7, 2024
24 checks passed
@jpivarski jpivarski deleted the jpivarski/dont-require-parameters-in-form branch July 7, 2024 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Random crash when reading mostly empty double nested branch
1 participant