Mar-20-2026, 03:37 PM
Hi everybody,
I have the following code:
However, when I run the exact same code on Windows 11 with
the urllib3-request works fine like on Ubuntu, but the requests-request fails with
I can reproduce the this behavior with any URL that uses TLS, i.e. any https://-URL.
Searching the net I couldn't find any hint on this problem. So I figure with requests on Windows I am doing something essential quite wrong or I might be missing some very basic stuff on the Windows machine.
I don't know if this is of any relevance but the Ubuntu machine is connected to unfiltered Internet while the Windows machine is a company laptop running zscaler setting up a VPN to a trusted endpoint.
Anyone any idea?
Best regards,
Martin
I have the following code:
import urllib3
import requests
url = "https://sha256.badssl.com/" # it's actually good (in regards to SSL), not bad :-)
resp1 = urllib3.request("GET", url)
if resp1.status == 200:
print("Results via urllib3:")
print(resp1.data)
resp2 = requests.get(url)
if resp2.status_code == 200:
print("Results via requests:")
print(resp1.text)When I run the above code on Ubuntu 25.10 with- python 3.13.7 (python3.13-minimal (3.13.7-1ubuntu0.3))
- urllib3 version 2.3.0
- requests version 2.32.3
However, when I run the exact same code on Windows 11 with
- Python 3.14.3 (main, Feb 12 2026, 00:39:15) [MSC v.1944 64 bit (AMD64)] on win32 via WinPython (WinPython64-3.14.3.0slim)
- urllib3 version 2.6.3
- requests version 2.32.5
the urllib3-request works fine like on Ubuntu, but the requests-request fails with
Error:ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1081)This is even more puzzeling as in my understanding requests is wrapping around urllib3.I can reproduce the this behavior with any URL that uses TLS, i.e. any https://-URL.
Searching the net I couldn't find any hint on this problem. So I figure with requests on Windows I am doing something essential quite wrong or I might be missing some very basic stuff on the Windows machine.
I don't know if this is of any relevance but the Ubuntu machine is connected to unfiltered Internet while the Windows machine is a company laptop running zscaler setting up a VPN to a trusted endpoint.
Anyone any idea?
Best regards,
Martin
