request fails on wikipedia (https) - certificate verify failed (_ssl.c:748)

F Massion fmassion at web.de
Tue Dec 12 13:18:06 EST 2017


Am Dienstag, 12. Dezember 2017 14:33:42 UTC+1 schrieb Jon Ribbens:
> On 2017-12-11, F Massion <fmassion at web.de> wrote:
> > ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)
> 
> Try `pip install certifi`

certifi was installed.
If I make the following changes I do not have the error message. I don't understand why, but this makes a difference:

#import requests --> import urllib.request

url = 'https://en.wikipedia.org/wiki/Stethoscope'
#res = requests.get(url) --> res = urllib.request.urlopen(url).read() 



More information about the Python-list mailing list