to run pd.read_html…
I’m facing by this error
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 1286, 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 1332, 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 1281, 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 1041, in _send_output
self.send(msg)
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py”, line 979, in send
self.connect()
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py”, line 1458, 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: self signed certificate in certificate chain (_ssl.c:1002)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “<pyshell#2>”, line 1, in
htmltse = pd.read_html(tse)
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/html.py”, line 1212, in read_html
return _parse(
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/html.py”, line 981, in _parse
tables = p.parse_tables()
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/html.py”, line 257, in parse_tables
tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/html.py”, line 816, in _build_doc
raise e
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/html.py”, line 797, in _build_doc
with urlopen(self.io) as f:
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/io/common.py”, line 270, in urlopen
return urllib.request.urlopen(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py”, line 216, in urlopen
return opener.open(url, data, timeout)
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py”, line 519, in open
response = self._open(req, data)
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py”, line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py”, line 496, in _call_chain
result = func(*args)
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py”, line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py”, line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1002)>
who can help me please???
I try to do it by MacBook m2pro