2

I'm trying to use the aggregate method on pymongo like so:

fnObjs.aggregate([
    {'$match': {'sha1_duplicate': false}}
])

I'm getting :

NameError: global name 'false' is not defined

The query does works on the mongo cli.

jbihan
  • 3,053
  • 2
  • 24
  • 34
gigman
  • 213
  • 2
  • 9

1 Answers1

3

As the error message says, false is not defined, because in Python, the boolean have a capital letter, so it's False and True.

Seb D.
  • 5,046
  • 1
  • 28
  • 36