From this error, I conclude that referenceElement is a dictionary (see below). A dictionary cannot be hashed and therefore cannot be used as a key to another dictionary (or to itself!).
>>> d1, d2 = {}, {} >>> d1[d2] = 1 Traceback (most recent call last): File "<input>", line 1, in <module> TypeError: unhashable type: 'dict'
You probably meant either for element in referenceElement.keys() or for element in json['referenceElement'].keys() . With a lot of context, what types of json and referenceElement and what they contain, we can better help you if none of the solutions work.
marcog Dec 25 '10 at 22:37 2010-12-25 22:37
source share