This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

ssl certificate verification failed

0

I am running the three lines of code from the example on the command line and I am getting an SSL certificate verification failed error. Thanks for any help or suggestion.

from OSMPythonTools.api import Api api = Api() way = api.query('way/5887599') [api] downloading data: way/5887599 The requested data could not be downloaded. Please check whether your internet connection is working. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1348, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1037, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 975, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1454, in connect self.sock = self._context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1075, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1346, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)

asked 07 Apr '23, 07:16

sartimk's gravatar image

sartimk
11112
accept rate: 0%

1

You should invest the effort to format your question in a legible fashion if you want people to spend their spare time helping you.

(07 Apr '23, 08:37) SimonPoole ♦

https://stackoverflow.com/help/how-to-ask might be useful - explain more about what you are doing to help others to help you.

(07 Apr '23, 09:55) SomeoneElse ♦

Source code available on GitHub .