pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed

pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed: my-clus1-shard-00-00-pri.xyz.mongodb.net:27017: [SSL: WRONG_VERSION_NUMBER]

Flask==2.0.2
Flask-PyMongo==2.2.0
requests==2.20.1
pymongo[tls,srv]==4.0.1

Any idea why the wrong ssl is from the packages or something else

What operating system, Python version and MongoDB version, and are you trying to connect through a proxy?

Docker
FROM python:3.6.8-alpine3.9

WORKDIR /app

COPY requirements.txt .

RUN pip install -r requirements.txt

RUN pip install gunicorn

COPY flaskr/bar.py .

EXPOSE 5000

CMD [“python”, “bar.py”]

What version of MongoDB and where is MongoDB running?

I found that the ssl issue is a red herring , i was trying to connect to a db in a different region and the error presented as such.

Its very strange and dishearting none the less everything is working now