You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just created a fresh Anaconda environment, installed pip, OSMPythonTools, ipykernel and pandas. But when I try the example in readme.md
from OSMPythonTools.api import Api api = Api() way = api.query('way/5887599')
I get this error which states that the SSL certificate has expired:
The requested data could not be downloaded. Please check whether your internet connection is working.
Traceback (most recent call last):
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1037, in _send_output
self.send(msg)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 975, in send
self.connect()
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 1070, in _create
self.do_handshake()
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\site-packages\OSMPythonTools\internal\cacheObject.py", line 95, in __query
response = urllib.request.urlopen(request)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 525, in open
response = meth(req, response)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 634, in http_response
response = self.parent.error(
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 557, in error
result = self._call_chain(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 749, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>
Traceback (most recent call last):
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1037, in _send_output
self.send(msg)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 975, in send
self.connect()
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 1070, in _create
self.do_handshake()
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\site-packages\OSMPythonTools\internal\cacheObject.py", line 95, in __query
response = urllib.request.urlopen(request)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 525, in open
response = meth(req, response)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 634, in http_response
response = self.parent.error(
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 557, in error
result = self._call_chain(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 749, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\site-packages\OSMPythonTools\internal\cacheObject.py", line 48, in query
data = self.__query(queryString, params)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\site-packages\OSMPythonTools\internal\cacheObject.py", line 103, in __query
raise Exception(msg, err)
Exception: ('The requested data could not be downloaded. Please check whether your internet connection is working.', URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')))
Edit:
Further System information:
Windows 11, Python 3.10.4, conda 4.11.0
The text was updated successfully, but these errors were encountered:
Sorry for answering so late, I was on vacation. As I do not use Anaconda and do not have a Windows environment available, I am not able to exactly check what is the issue. From what I guess, however, it is a not-up-to-date certifi package. Can you try to upgrade that one to the newest version? With pip, it would be: pip3 install --upgrade certifi
I do not know the corresponding command for Anaconda.
Hi,
I just created a fresh Anaconda environment, installed pip, OSMPythonTools, ipykernel and pandas. But when I try the example in readme.md
from OSMPythonTools.api import Api api = Api() way = api.query('way/5887599')
I get this error which states that the SSL certificate has expired:
The requested data could not be downloaded. Please check whether your internet connection is working.
Traceback (most recent call last):
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1037, in _send_output
self.send(msg)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 975, in send
self.connect()
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 1070, in _create
self.do_handshake()
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\site-packages\OSMPythonTools\internal\cacheObject.py", line 95, in __query
response = urllib.request.urlopen(request)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 525, in open
response = meth(req, response)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 634, in http_response
response = self.parent.error(
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 557, in error
result = self._call_chain(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 749, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>
Traceback (most recent call last):
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1037, in _send_output
self.send(msg)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 975, in send
self.connect()
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\http\client.py", line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 1070, in _create
self.do_handshake()
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\site-packages\OSMPythonTools\internal\cacheObject.py", line 95, in __query
response = urllib.request.urlopen(request)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 525, in open
response = meth(req, response)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 634, in http_response
response = self.parent.error(
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 557, in error
result = self._call_chain(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 749, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\site-packages\OSMPythonTools\internal\cacheObject.py", line 48, in query
data = self.__query(queryString, params)
File "C:\Users\fherb\anaconda3\envs\OpenStreetMap\lib\site-packages\OSMPythonTools\internal\cacheObject.py", line 103, in __query
raise Exception(msg, err)
Exception: ('The requested data could not be downloaded. Please check whether your internet connection is working.', URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')))
Edit:
Further System information:
Windows 11, Python 3.10.4, conda 4.11.0
The text was updated successfully, but these errors were encountered: