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'm using Python 3.9 on OSX 10.15.7 and I've been running into the following error:
File "watch_server_and_reset.py", line 16, in hetzner_list
list(robot.servers)
File "/usr/local/lib/python3.9/site-packages/hetzner/robot.py", line 391, in __iter__
return iter([Server(self.conn, s) for s in self.conn.get('/server')])
File "/usr/local/lib/python3.9/site-packages/hetzner/robot.py", line 368, in get
return self.request('GET', path)
File "/usr/local/lib/python3.9/site-packages/hetzner/robot.py", line 329, in request
response = self._request(method, path, data, headers)
File "/usr/local/lib/python3.9/site-packages/hetzner/robot.py", line 301, in _request
self.conn.request(method.upper(), path, data, headers)
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1279, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1325, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1274, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1034, in _send_output
self.send(msg)
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 974, in send
self.connect()
File "/usr/local/lib/python3.9/site-packages/hetzner/util/http.py", line 68, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1405, in wrap_socket
return context.wrap_socket(
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)
I've found Stackoverflow threads where other people fixed this by running the python update .command files, or by modifying the ssl library's certificate validating mechanism (code below), but neither solution has fixed the issue for me.
Suppressed the error by editing the http.py file with the edit here.
I don't like this fix, however if you're going to replicate it the file for editing is located here (at least on my system/py version): /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/hetzner/util/http.py
I'm using Python 3.9 on OSX 10.15.7 and I've been running into the following error:
I've found Stackoverflow threads where other people fixed this by running the python update .command files, or by modifying the ssl library's certificate validating mechanism (code below), but neither solution has fixed the issue for me.
The text was updated successfully, but these errors were encountered: