딸기스무디

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: 본문

python

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url:

strawberry-smoothie 2020. 8. 10. 13:33
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/telepot/__init__.py", line 1183, in get_from_telegram_server
    allowed_updates=allowed_upd)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/telepot/__init__.py", line 1000, in getUpdates
    return self._api_request('getUpdates', _rectify(p))
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/telepot/__init__.py", line 491, in _api_request
    return api.request((self._token, method, params, files), **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/telepot/api.py", line 154, in request
    r = fn(*args, **kwargs)  # `fn` must be thread-safe
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/urllib3/request.py", line 171, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/urllib3/poolmanager.py", line 330, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
    **response_kw
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
    **response_kw
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
    **response_kw
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot1150210641:AAENUr3o-0y9r2zOrH1TRqvXBfOvWulBQs8/getUpdates (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
^CTraceback (most recent call last):

 

리눅스에서 파이썬으로 작성한 파일을 실행시켰더니 오류가 발생하였으나 윈도우에서는 문제가 없었음

 

urllib3버전을 바꾸어주니 해결완료

pip install urllib3==1.24.1

 

참고: https://stackoverflow.com/questions/42112605/error-installing-urllib3

'python' 카테고리의 다른 글

파이썬에서 rss로 xml파일 다운로드가 잘 안될떄  (0) 2020.08.10
Comments