Lecture: MongoClient port

In MongoClient, when i run the cell which says client = MongoClient(uri), I get the error ValueError: Port must be an integer between 0 and 65535:

The uri I used is: “mongodb+srv://m220-user:m220-pass@http://mflix-6p51d.mongodb.net/test

Hi @Shoumik_55292,

Try removing http:// from your uri

Best regards

3 Likes

That’s absolutely it. The URI already specifies a protocol, using “mongo+srv://“.

2 Likes