no ciphers available가 무슨 오류일까요?(Qpython)
조회수 844회
QPython3 안드로이드 앱 사용중이고 requests모듈은 pip로 설치한 상황입니다.
import requests
req = requests.get("http://google.com")
print(req.text)
위와 같이 코드를 입력하면 정상적으로 실행되지만 http를 https로 바꾸면 아래와 같은 오류가 뜹니다.
ssl.SSLError: [SSL: NO_CIPHERS_AVAILABLE] no ciphers availble (_ssl.c:841)
During handling of the above exception, another exception ocurred:
(중략)
urlib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url / (Caused by SSLError(SSLError(1, '[SSL: NO_CIPHERS_AVAILABLE] no ciphers available (_ssl.c:841)'),))
During handling of the above exception, another exception ocurred:
(중략)
requests.exceptions.SSLError: HTTPSConnectionPool(host = 'www.google.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: NO_CIPHERS_AVAILABLE] no ciphers available (_ssl.c:841)'),))
처음엔 https관련 문제인 줄 알았는데 주소를 아마존으로 바꿔서 해보니 아마존의 경우에는 http로 하든 https로 하든 같은 오류가 뜹니다.
안드로이드에서 크롤링을 할 계획이었는데 같은 코드임에도 PC에선 잘 되고 여기선 잘 안되네요 ㅠㅠ
1 답변
-
python 버전은 몇인가요? 또한 안드로이드에 설치된 openssl 버전은 몇 인지요?
해당 오류는 단순할수도 복잡할수도 있습니다.
일단 google.com 에 접속하면 tls 1.3 을 요구합니다.
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384 Server public key is 256 bit
파이썬은 ssl 사용시 openssl 을 사용합니다. https 접속시 오류가 발생하면 필히 openssl 버전을 확인해봐야 합니다. 보통 python에 openssl 라이브러리가 함께 배포되므로 python 버전을 확인하면 openssl 버전도 알 수 있습니다.
파이썬 3.5.2 이상 그리고 openssl 1.1.0 이상인지 확인해보시기 바랍니다.
댓글 입력