N
N
novicheck2016-07-08 15:29:13
Python
novicheck, 2016-07-08 15:29:13

Why does it swear by the words TypeError: unhashable type: 'dict'?

I have a code snippet:

print(db.events.aggregate([
        {"$match": {"is_buyer": 0}},
        {"$group": {level: "$eventName", total: {'$sum': 1}}},
        {"$sort": {level: 1}}
    ])
)

and on the 2nd line of the fragment Python 2.7.12 swears with the following words:
TypeError: unhashable type: 'dict'
What should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-07-08
@novicheck

'level'
'total'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question