0

I am encountering some errors when using the requests library for making requests to a particular website. At times, it works fine, but other times it returns an error. Can anyone assist me in identifying the issue and providing a solution? I am aware of the verify=False option, but I cannot use it due to security concerns.

requests.exceptions.SSLError: HTTPSConnectionPool(host='*', port=443): Max retries exceeded with url: /token (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)')))
Traceback (most recent call last):

File /app/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py, line 703, in urlopen

    {code_line}
File /app/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py, line 386, in _make_request

    {code_line}
File /app/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py, line 1042, in _validate_conn

    {code_line}
File /app/.venv/lib/python3.10/site-packages/urllib3/connection.py, line 414, in connect

    {code_line}
File /app/.venv/lib/python3.10/site-packages/urllib3/util/ssl_.py, line 449, in ssl_wrap_socket

    {code_line}
File /app/.venv/lib/python3.10/site-packages/urllib3/util/ssl_.py, line 493, in _ssl_wrap_socket_impl

    {code_line}
File /usr/local/lib/python3.10/ssl.py, line 513, in wrap_socket

    {code_line}
File /usr/local/lib/python3.10/ssl.py, line 1071, in _create

    {code_line}
File /usr/local/lib/python3.10/ssl.py, line 1342, in do_handshake

    {code_line}

ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)
During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File /app/.venv/lib/python3.10/site-packages/requests/adapters.py, line 489, in send

    {code_line}
File /app/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py, line 787, in urlopen

    {code_line}
File /app/.venv/lib/python3.10/site-packages/urllib3/util/retry.py, line 592, in increment

    {code_line}

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='*', port=443): Max retries exceeded with url: /token (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)')))
During handling of the above exception, another exception occurred:

I have also tried to update the request library and OpenSSL

0 Answers0