I get an error: Too many values to unpack. and then also:
self.__ordering = helpers._index_document(keys)
NOTE: I tried to make use of this link.
Python ValueError: too many values to unpack
Code is as following:
docs = grades.find({'type':"homework",'student_id':i})
docs = docs.sort(['score',-1])
counter = grades.find({'type':"homework",'student_id':i})
counter = counter.sort(['score',-1]).count()