ValueError: Port must be an integer between 0 and 65535 [TICKET: CONNECTION] [SOLVED]

[Ticket - Connection]

After successful dataset import, I have executed and tried to validate my connection ticket by clicking “click here to begin validation” button corresponding to Connection in my localhost but I am getting the following error in my shell.

And also, my localhost looks like this.

I did give few tries to solve the error but couldn’t able to figure it out. Please help.

Please check this link and other links on connection errors

Lecture: MongoClient port

Hi @Abinandaraj_Rajendran_36882,

Please let us know if you are still facing the issue.


Thanks for the replies.

I am getting the error only when I try to validate connection ticket after executing It doesn’t have to do anything with MongoClient file.

The issue still remains unsolved. I did not use “http://” in my uri. I retried again today and the problem still persists with a different error. I have attached my error and .ini file screenshots. Please check.

My .ini might be the culprit here. Not sure though!

Hi @Abinandaraj_Rajendran_36882,

You are right! The file seems to be missing line breaks.

Please correct your file and then try again. Here is my file contents:

# Ticket: Connection

# Rename this file to .ini after filling in your MFLIX_DB_URI and your SECRET_KEY

# Do not surround the URI with quotes


SECRET_KEY = super_secret_key_you_should_change

MFLIX_DB_URI = mongodb+srv://m220student:m220password@[spoiler]<CLUSTER_URL>[/spoiler]


SECRET_KEY = super_secret_testing_key

MFLIX_DB_URI = mongodb+srv://m220student:m220password@<CLUSTER_URL>


Hi Kanika,

I tried as you suggested but the issue still exists. I am getting the same error as before even after implementing necessary changes to your above given .ini file.


Hi Abinandaraj_Rajendran,

Please run the following before running

pip install -r requirements.txt

The error: “ssl module is not available” from your first screenshot means something is missing. If you have already done with the requirements, please find below links:


The issue has been resolved. Installation of OpenSSL from the link worked for me.

Thank you