Inconsistent database names in Jupyter notebooks

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


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.


Hi James_11323,

Thanks for the note, we originally named the DB and collections based on how the videos were recorded. In the future, we will consider renaming these to match students’ Atlas clusters.


OK, I have lost quite a lot of time to understand where it was the error! Please write at least at footnote on lesson, it would be a time savere.
Thank you