Getting Error While fetching Quote for multiple instrument continuously

neerleo88
Hi @rakeshr @sujith

I am getting Below error . I am trying to fetch multiple instrument quote continuously(after every 5 minutes)
Traceback (most recent call last):
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\util\connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "C:\Users\neer\AppData\Local\Programs\Python\Python37-32\lib\socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn
conn.connect()
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\connection.py", line 334, in connect
conn = self._new_conn()
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [
Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\urllib3\util\retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /quote?i=9312258 (Caused b
y NewConnectionError(': Failed to establish a new connection: [Errno 11004] geta
ddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "qoute_volume_fetch.py", line 103, in
qoute=kite.quote(call_instrument_token[i][0])
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 546, in quote
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 697, in _get
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 745, in _request
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 742, in _request
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "C:\Users\neer\PycharmProjects\kite_new\venv\lib\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /quote?i=9312258 (Cause
d by NewConnectionError(': Failed to establish a new connection: [Errno 11004] g
etaddrinfo failed'))
  • rakeshr
    @neerleo88
    [Errno 11004] getaddrinfo failed
    Seems like your host error. How often are you getting this error?
    Also, are you using any VPN?
Sign In or Register to comment.