This is a pymongo configuration error. Make sure dnspython module is installed:
pip install dnspython
I had to specify at the first argument in my connection string: "mongodb+srv":