I am trying to use Zeep to load a WSDL file, but when I do, I receive the following error:
requests.exceptions.SSLError: HTTPSConnectionPool(host='api-mte.itespp.org', port=443): Max retries exceeded with url: /markets/VirtualService/v2/?WSDL (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:997)')))
I have read in another answer (Python - requests.exceptions.SSLError - dh key too small) that this can be solved using a different cipher suite (as I think the server is old which is what's causing this error), but I don't know how to do this with Zeep. Any ideas? Thanks!
The answer is basically the same as from [another question][1] I asked as
zeepuses therequestsmodule, and after usingrequeststo get the cipher you want, it is merely applying that session tozeep. Below is a code sample I used.