Failed Aggregation On Tornado/Motor: Yielded Unknown Object MotorAggregationCursor
I'm having issue to execute MongoDB aggregation operation on Tornado. This is the code, pipeline = [ {'$match': { '$or': [ {'owner.id': '56dfdaa4082024b9384c00
Solution 1:
The actual .aggregate()
method is not itself "async". But the cursor iteration is.
So instead:
cursor = db.activities.aggregate(pipeline)
while (yield cursor.fetch_next):
doc = cursor.next_object()
print(doc)
Just like the docs say.
Post a Comment for "Failed Aggregation On Tornado/Motor: Yielded Unknown Object MotorAggregationCursor"