0

I'm trying to use the following line through flask:

collection = 'mongo.db.vehicules.distinct("date_debut", {"modele":"Q5"})'

When I don't insert the second arguments, the query works fine. With the second one, I have the following error:

TypeError: distinct() takes 2 positional arguments but 3 were given

The same query in Mongo shell works fine.

Anyone has faced the same issue?

Thanks

marxan
  • 17
  • 1
  • 3
  • I think this is what you are looking for [pymongo distinct](http://stackoverflow.com/questions/12879781/pymongo-how-can-i-have-distinct-values-for-a-field-along-with-other-query-param#12883331) – metmirr Dec 05 '16 at 06:34
  • Thanks, it was that indeed. – marxan Dec 05 '16 at 09:05

0 Answers0