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

dieter dieter at handshake.de
Tue Dec 12 02:29:33 EST 2017


F Massion <fmassion at web.de> writes:
> ...
> I would like to get information from Wikipedia articles and I am testing the connection to Wikipedia. 
>
> I am running Python 3.6.2 on Windows 10.
>
> I get certificate errors for all pages with https. 
> Any suggestions are welcome!
> ...
>     self._sslobj.do_handshake()
>   File "c:\Program Files (x86)\Python36-32\lib\ssl.py", line 683, in do_handshake
>     self._sslobj.do_handshake()
> ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)

There are too possibilities:
  * the certificate is really invalid
  * Python does not know the root certificate[s] necessary for the verification.

To differenciate between the possibilities, connect (on the same computer)
Wikipedia via a browser. If it, too, reports certificate problems,
you likely have the first possibility; otherwise, the second.

Python typically looks for root certificate information at the same
(platform dependent) place as the browsers. Thus, normally, there
is no need to tell Python where to look for them; but, you can do it
in the case that the root certificates are installed strangely. Consult
the documentation.




More information about the Python-list mailing list