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

It's possible for a ReadOnlyDirectory to be created without all fields. #658

Closed
jpivarski opened this issue Aug 3, 2022 · 1 comment · Fixed by #660
Closed

It's possible for a ReadOnlyDirectory to be created without all fields. #658

jpivarski opened this issue Aug 3, 2022 · 1 comment · Fixed by #660
Labels
bug The problem described is something that must be fixed good first issue Good for newcomers

Comments

@jpivarski
Copy link
Member

ReadOnlyDirectory has a few attributes that usually get filled with meaningful values when fSeekKeys != 0. But in that special case:

uproot5/src/uproot/reading.py

Lines 1405 to 1407 in 914dd25

if self._fSeekKeys == 0:
self._header_key = None
self._keys = []

the self._keys_lookup and self._len attributes don't get set (any others? scroll down to check). They should be set in any case, possibly before that if-branch so that conditional initialization doesn't bite us again.

@jpivarski jpivarski added the bug The problem described is something that must be fixed label Aug 3, 2022
@jpivarski
Copy link
Member Author

By the way, this should be back-ported to main-v4 and make a new v4 release, not just main/v5. It's important enough to warrant a new v4 release.

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 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant