왜 말을 안 듣는거야!!!
그지같은 맥북 (하지만 이쁘죠?)
파이썬 설치하나 하는데도 뭔 인증을 해줘야하는건지
이해가 안간다 (하지만 이쁘죠?)
손 진짜 많이가고 번거로운데 (이쁘니까) 내가 참는다
1) [에러 발생] 파이썬 인증 에러
간만에 OS 싹다 밀고 쓰려니
파이썬이 없네?
파이썬 설치하고 보니 코드가 실행이 안돼
아래와 같은 에러 발생
더보기
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 466, in _make_request
self._validate_conn(conn)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1095, in _validate_conn
conn.connect()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connection.py", line 652, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connection.py", line 805, in _ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 465, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 509, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/Library/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: self signed certificate in certificate chain (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 789, in urlopen
response = self._make_request(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 490, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/ratatou2/Downloads/telegram_alert-master(플젝 최종 ver)/telegram_alert.py", line 22, in <module>
send_telegram_message(message_content)
File "/Users/ratatou2/Downloads/telegram_alert-master(플젝 최종 ver)/telegram_alert.py", line 12, in send_telegram_message
bot.sendMessage(CHAT_ID, message)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/telepot/__init__.py", line 513, in sendMessage
return self._api_request('sendMessage', _rectify(p))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/telepot/__init__.py", line 491, in _api_request
return api.request((self._token, method, params, files), **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/telepot/api.py", line 154, in request
r = fn(*args, **kwargs) # `fn` must be thread-safe
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/_request_methods.py", line 279, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/poolmanager.py", line 443, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 873, in urlopen
return self.urlopen(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 873, in urlopen
return self.urlopen(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 873, in urlopen
return self.urlopen(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 843, in urlopen
retries = retries.increment(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot6871924649:AAF6v14p8azIcsJPNpp3-52LKpCYvQWuMDQ/sendMessage (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))
인증이 안됐댄다
2) [에러 해결] 맥의 파이썬은 인증을 받아야한다
Mac OS 싹다 밀고 한건 또 처음이라 찾아보니 맥에 설치한 파이썬은 인증을 받아야한다네...
귀찮은 애증의 이쁜 물건... 해결해보자
(1) 파이썬 설치 경로로 간다
저기 보이는 'Install Certificates.command'를 실행
뭐가 줄줄줄 나오고는 프로세스 완료된다
(정확히는 인증서 깔렸고, ip 버전 낮다고 옹알옹알)
3) 해결
이제 실행하면 문제없이 잘 된다
'Mac' 카테고리의 다른 글
맥북 SFTP 연결하기 (feat. NAS 연결하기) (1) | 2024.11.26 |
---|