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
thanks for this usefull library.
I got some problems when I compare two list. Each of them has one boolean as element. Using DeepDiff with ignore_order=False works like a charm. But forced with ignore_order=True doesn't work anymore.
Code to reproduce:
from deepdiff import DeepDiff
a = [True]
b = [False]
print(DeepDiff(a, b, ignore_order=True))
Can not produce a hash for root.Not counting this object.
'True is not one of the hashed items.'
Can not produce a hash for root.Not counting this object.
'False is not one of the hashed items.'
{}
I need the ignore_order to be true, for other objects.
deepdiff 4.0.7, Python 3.6.9, Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
item_hash = hashes_all[item]
except Exception as e: # pragma: no cover
logger.error("Can not produce a hash for %s."
"Not counting this object.\n %s" %
(level.path(), e))
After some little trial and error, I got some findings in context with the problem. Interesting part is in file diff.py, line 479. The value of "item" is an element(type bool) of the list. But the dictionary hashes_all contains "only" an object of type "BoolObj".
With a different kind of types(e.g strings), these two objetcs "matches". It looks like the object needs to be converted from the "BoolObj" type back to the "bool" type.
I'm still relatively new to programming. But I try to stay tuned to the understanding of the program.
Hey guys,
thanks for this usefull library.
I got some problems when I compare two list. Each of them has one boolean as element. Using DeepDiff with ignore_order=False works like a charm. But forced with ignore_order=True doesn't work anymore.
Code to reproduce:
Expected results:
Real results:
I need the ignore_order to be true, for other objects.
deepdiff 4.0.7, Python 3.6.9, Ubuntu 18.04
The text was updated successfully, but these errors were encountered: