Python에서 Read time out 오류 해결 문제(바이낸스 API 이용) socket.timeout: The read operation timed out

조회수 1266회

CCXT 라이브러리로 바이낸스 선물 5분봉 조회 - 조건 부합시 주문하는 코드를 While True 를 써서 4분단위로 반복하게 실행하는데요, 실행하고 약 4시간 정도 있으면 아래와 같은 리드타임 에러가 발생합니다. 혹시 해결방법을 알 수 있을까요??

Traceback (most recent call last):
  File "C:\Users\kim\PycharmProjects\cointrader\venv\lib\site-packages\urllib3\connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "C:\Users\kim\PycharmProjects\cointrader\venv\lib\site-packages\urllib3\connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Users\kim\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 1331, in getresponse
    response.begin()
  File "C:\Users\kim\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "C:\Users\kim\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Users\kim\AppData\Local\Programs\Python\Python36\lib\socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "C:\Users\kim\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 1002, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Users\kim\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 865, in read
    return self._sslobj.read(len, buffer)
  File "C:\Users\kim\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 625, in read
    v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)