M220P course error

I am stuck in the first ticket where we have to get the list of movies by country names. Here is the query I am giving:
db.movies.find({“countries”: { $in: [countries]}}, {“title” : 1})
The same query works perfectly in Compass, but gives error while running in db.py.
Please suggest how to proceed. Am I doing anything incorrectly?

I was able to do this … by adding double quotes to the $in operator… (duh) so the query should be
db.movies.find({“countries”: { “$in”: [countries]}}, {“title” : 1})

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.