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

'KeyError': index out of bounds on patch.remove #176

Open
alejandromumo opened this issue Jan 25, 2023 · 0 comments
Open

'KeyError': index out of bounds on patch.remove #176

alejandromumo opened this issue Jan 25, 2023 · 0 comments
Labels

Comments

@alejandromumo
Copy link
Member

This bug relates to the following lines:

dest = dot_lookup(destination, node)
if isinstance(dest, SET_TYPES):
dest -= value
else:
del dest[key]

Description:

  • destination is an array that is constantly mutated by dest[del]
  • key is computed in an outter scope. On Zenodo, it's pre-computed based on the original field's array (e.g. 'authors' of a deposit).
  • At some point, the array might be smaller than the original one and dest[key] can raise a IndexError. This was observed when a deposit had multiple changes to the author's list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant