inveniosoftware / inveniosoftware/dictdiffer
'KeyError': index out of bounds on patch.remove
Open
bug
- Dominant language
- Python
- Stars
- 849
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
This bug relates to the following lines:
https://github.com/inveniosoftware/dictdiffer/blob/6719335a28f6f3bd465379c8c4b72c5e0cbdf5d8/dictdiffer/__init__.py#L315-L319
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.
Contributor guide
Assessment
This issue has not been assessed yet.