There is an issue in the latest pymongo driver ( 2.1.1 ) and the usage
of hint.
It seems that the hint command refuse any index_name and raise an
OperationFailure.
Reading the documentation (http://api.mongodb.org/python/current/api/pymongo/cursor.html?highlight=hint#pymongo.cursor.Cursor.hint) it should be used like this:
>> cursor.hint([('index_name', pymongo.ASCENDING)])
but it fail and raise an Exception.
>> pymongo.errors.OperationFailure: database error: bad hint
To reproduce the problem I have posted an example here:
http://nopaste.info/a63201cae6.html.
The steps to reproduce the Exception are just simple, if you already have a collection, just try to use hint on it with an existing index_name and it will fail.
You can try the exact same process in the mongo interpreter and it will just work.