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.
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.
As the error message says, false
is not defined, because in Python, the boolean have a capital letter, so it's False
and True
.