It looks like you're new here. If you want to get involved, click one of these buttons!
Traceback (most recent call last):
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:536 in _make_request
response = conn.getresponse()
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connection.py:464 in getresponse
httplib_response = super().getresponse()
File ~\anaconda3\envs\py3124\Lib\http\client.py:1428 in getresponse
response.begin()
File ~\anaconda3\envs\py3124\Lib\http\client.py:331 in begin
version, status, reason = self._read_status()
File ~\anaconda3\envs\py3124\Lib\http\client.py:292 in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File ~\anaconda3\envs\py3124\Lib\socket.py:708 in readinto
return self._sock.recv_into(b)
File ~\anaconda3\envs\py3124\Lib\ssl.py:1252 in recv_into
return self.read(nbytes, buffer)
File ~\anaconda3\envs\py3124\Lib\ssl.py:1104 in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File ~\anaconda3\envs\py3124\Lib\site-packages\requests\adapters.py:667 in send
resp = conn.urlopen(
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:843 in urlopen
retries = retries.increment(
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\util\retry.py:474 in increment
raise reraise(type(error), error, _stacktrace)
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\util\util.py:39 in reraise
raise value
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:789 in urlopen
response = self._make_request(
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:538 in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:369 in _raise_timeout
raise ReadTimeoutError(
ReadTimeoutError: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
Cell In[7], line 1
dwnld_nifty_wkly_op(week_start = "2024-08-09",weekly_expiry = "2024-08-14")
Cell In[6], line 4 in dwnld_nifty_wkly_op
ins_df = pd.DataFrame(tf.akr_kite.instruments())
File ~\anaconda3\envs\py3124\Lib\site-packages\kiteconnect\connect.py:568 in instruments
return self._parse_instruments(self._get("market.instruments.all"))
File ~\anaconda3\envs\py3124\Lib\site-packages\kiteconnect\connect.py:861 in _get
return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
File ~\anaconda3\envs\py3124\Lib\site-packages\kiteconnect\connect.py:916 in _request
raise e
File ~\anaconda3\envs\py3124\Lib\site-packages\kiteconnect\connect.py:904 in _request
r = self.reqsession.request(method,
File ~\anaconda3\envs\py3124\Lib\site-packages\requests\sessions.py:589 in request
resp = self.send(prep, **send_kwargs)
File ~\anaconda3\envs\py3124\Lib\site-packages\requests\sessions.py:703 in send
r = adapter.send(request, **kwargs)
File ~\anaconda3\envs\py3124\Lib\site-packages\requests\adapters.py:713 in send
raise ReadTimeout(e, request=request)
ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
Maybe try it out with some active tokens.
In [14]:niftybank_call_strike_token
Out[14]: 14066946
niftybank_call_strike_df = pd.DataFrame(hist_kite.historical_data(niftybank_call_strike_token,from_date,to_date,interval))
Traceback (most recent call last):
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:536 in _make_request
response = conn.getresponse()
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connection.py:464 in getresponse
httplib_response = super().getresponse()
File ~\anaconda3\envs\py3124\Lib\http\client.py:1428 in getresponse
response.begin()
File ~\anaconda3\envs\py3124\Lib\http\client.py:331 in begin
version, status, reason = self._read_status()
File ~\anaconda3\envs\py3124\Lib\http\client.py:292 in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File ~\anaconda3\envs\py3124\Lib\socket.py:708 in readinto
return self._sock.recv_into(b)
File ~\anaconda3\envs\py3124\Lib\ssl.py:1252 in recv_into
return self.read(nbytes, buffer)
File ~\anaconda3\envs\py3124\Lib\ssl.py:1104 in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File ~\anaconda3\envs\py3124\Lib\site-packages\requests\adapters.py:667 in send
resp = conn.urlopen(
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:843 in urlopen
retries = retries.increment(
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\util\retry.py:474 in increment
raise reraise(type(error), error, _stacktrace)
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\util\util.py:39 in reraise
raise value
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:789 in urlopen
response = self._make_request(
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:538 in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File ~\anaconda3\envs\py3124\Lib\site-packages\urllib3\connectionpool.py:369 in _raise_timeout
raise ReadTimeoutError(
ReadTimeoutError: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
Cell In[19], line 1
niftybank_call_strike_df = pd.DataFrame(hist_kite.historical_data(niftybank_call_strike_token,from_date,to_date,interval))
File ~\anaconda3\envs\py3124\Lib\site-packages\kiteconnect\connect.py:632 in historical_data
data = self._get("market.historical",
File ~\anaconda3\envs\py3124\Lib\site-packages\kiteconnect\connect.py:861 in _get
return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
File ~\anaconda3\envs\py3124\Lib\site-packages\kiteconnect\connect.py:916 in _request
raise e
File ~\anaconda3\envs\py3124\Lib\site-packages\kiteconnect\connect.py:904 in _request
r = self.reqsession.request(method,
File ~\anaconda3\envs\py3124\Lib\site-packages\requests\sessions.py:589 in request
resp = self.send(prep, **send_kwargs)
File ~\anaconda3\envs\py3124\Lib\site-packages\requests\sessions.py:703 in send
r = adapter.send(request, **kwargs)
File ~\anaconda3\envs\py3124\Lib\site-packages\requests\adapters.py:713 in send
raise ReadTimeout(e, request=request)
ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)