Be aware that the Jupyter notebooks are inconsistent in the database name they expect to find your mflix collections.
The MongoClient notebook expects database “mflix” (which is where they end up after the import) whereas your_first_read expects “m220”
To fix, change the third line in cell from
m220 = client,m220
to
m220 = client.mflix
The end result:
import pymongo
uri = “mongodb+srv://m220student:m220password@<YOUR_ATLAS_CLUSTER>”
client = pymongo.MongoClient(uri)
m220 = client.mflix
movies = m220.movies
if you want, you could tidy up further by replacing the other 2 references to “m220” with “mflix” but notebook works fine as above.