"Invalid URI scheme: mongodb+srv" error

I’m getting this error. What should I do?

Have you created and activated your virtual environment?

Have you install the requirements?

1 Like

I installed pymongo. What do you mean by a virtual environment?

Hi Prannav,

You may require PyMongo[SRV] to leverage SRV DNS records for your connection string


I cannot indicate you the exact location, but I think it is explained in the first chapter under something that should look like setting up mflix.

1 Like

Thank you sir. I was able to run it after I changed pymongo to 3.11

1 Like

I didn’t know there was such a thing. I had to change either the version or the connection string when I completed my course :slight_smile:

on pymongo · PyPI it reads as:

Support for mongodb+srv:// URIs requires dnspython:
$ python -m pip install "pymongo[srv]"

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