You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In version 8.0.1, accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty #508
Please checkout the F.A.Q page before creating a bug ticket to make sure it is not already addressed.
Describe the bug
Accessing the property affected_root_keys on the object returned by the DeepDiff function applied to two dicts one of which is empty fails with an AttributeError.
To Reproduce
Create two dict objects one of which is empty and the other with at least one key/value pair.
Call DeepDiff: result = deepdiff.DeepDiff(emptyDict, otherDict).
Access result.affected_root_keys.
Expected behavior
Test whether a particular key is in result.afffected_root_keys.
OS, DeepDiff version and Python version (please complete the following information):
OS: [e.g. Ubuntu]: Ubuntu
Version [e.g. 20LTS]: 22.04.5 LTS
Python Version [e.g. 3.9.12]: 3.12.1
DeepDiff Version [e.g. 5.8.0]: 8.0.1
Additional context
Add any other context about the problem here.
Activity
passitalong commentedon Nov 21, 2024
Confirming this is a bug here too.
generates an
AttributeError: 'NoneType' object has no attribute 'param'Workaround is to force the old usage.
seperman commentedon Dec 15, 2024
Hi @trac-mfraka Thanks for reporting the bug.
Hi @passitalong thanks for the reproducible code.
Looking into it.
fixes accessing the affected_root_keys property on the diff object re…