How do I fix TLS Error when connecting with Python Client?

When I try to connect to Elasticsearch with Python Client, I get this error: elastic_transport.TlsError: TLS error caused by: TlsError(TLS error caused by: SSLError([SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997))). I can successfully open localhost:9200 in the browser, and the curl requests are working. How do I fix this?