As advised in the thread, I have updated pykiteconnect by running : pip install --upgrade kiteconnect Is this the correct way ?
Please see the error that I get : Traceback (most recent call last): File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request six.raise_from(e, None) File "", line 2, in raise_from File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 383, in _make_request httplib_response = conn.getresponse() File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 1197, in getresponse response.begin() File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 297, in begin version, status, reason = self._read_status() File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\http\client.py", line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\socket.py", line 575, in readinto return self._sock.recv_into(b) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\contrib\pyopenssl.py", line 294, in recv_into raise timeout('The read operation timed out') socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\adapters.py", line 440, in send timeout=timeout File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\util\retry.py", line 357, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\packages\six.py", line 686, in reraise raise value File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen chunked=chunked) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 389, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 309, in _raise_timeout raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value) urllib3.exceptions.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): File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\My Codes\Beta\Beta_23Aug18_StreamReader.py", line 679, in test_amnt = margin_to_be_allocated(signal_strength) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\My Codes\Beta\Beta_23Aug18_StreamReader.py", line 256, in margin_to_be_allocated Margin_Available = kite.margins('equity')['net'] File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\kiteconnect-3.7.4-py3.5.egg\kiteconnect\connect.py", line 293, in margins return self._get("user.margins.segment", {"segment": segment}) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\kiteconnect-3.7.4-py3.5.egg\kiteconnect\connect.py", line 697, in _get return self._request(route, "GET", params) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\kiteconnect-3.7.4-py3.5.egg\kiteconnect\connect.py", line 745, in _request raise e File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\kiteconnect-3.7.4-py3.5.egg\kiteconnect\connect.py", line 742, in _request proxies=self.proxies) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "C:\Users\Pranshu\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\adapters.py", line 521, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)