in get_sell_price Unhandled Error Traceback (most recent call last): File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\python\log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\python\log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\python\context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\python\context.py", line 85, in callWithContext return func(*args,**kw) --- --- File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\selectreactor.py", line 149, in _doReadOrWrite why = getattr(selectable, method)() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\tcp.py", line 243, in doRead return self._dataReceived(data) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\tcp.py", line 249, in _dataReceived rval = self.protocol.dataReceived(data) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\protocols\tls.py", line 330, in dataReceived self._flushReceiveBIO() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\protocols\tls.py", line 295, in _flushReceiveBIO ProtocolWrapper.dataReceived(self, bytes) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\protocols\policies.py", line 120, in dataReceived self.wrappedProtocol.dataReceived(data) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\twisted\websocket.py", line 291, in dataReceived self._dataReceived(data) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 1213, in _dataReceived self.consumeData() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 1225, in consumeData while self.processData() and self.state != WebSocketProtocol.STATE_CLOSED: File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 1591, in processData fr = self.onFrameEnd() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 1713, in onFrameEnd self._onMessageEnd() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\twisted\websocket.py", line 319, in _onMessageEnd self.onMessageEnd() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 634, in onMessageEnd self._onMessage(payload, self.message_is_binary) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\twisted\websocket.py", line 322, in _onMessage self.onMessage(payload, isBinary) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\ticker.py", line 71, in onMessage File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\ticker.py", line 677, in _on_message File "E:/Timsy/PT/PT_Code2_31.12.2019.py", line 1218, in on_ticks price_cash = get_sell_price(all_pairs.at[i, 'symbol2'], position2_cash,'NSE') File "E:/Timsy/PT/PT_Code2_31.12.2019.py", line 256, in get_sell_price quote = kite.quote(exchange+':' + symbol) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 546, in quote File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 697, in _get File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 745, in _request File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\connect.py", line 742, in _request File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7) Unhandled Error Traceback (most recent call last): File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\kiteconnect-3.7.7-py3.7.egg\kiteconnect\ticker.py", line 534, in connect File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\base.py", line 1261, in run self.mainLoop() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\base.py", line 1273, in mainLoop self.doIteration(t) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\selectreactor.py", line 143, in doSelect _logrun(selectable, _drdw, selectable, method) --- --- File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\python\log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\python\log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\python\context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\python\context.py", line 85, in callWithContext return func(*args,**kw) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\selectreactor.py", line 154, in _doReadOrWrite self._disconnectSelectable(selectable, why, method=="doRead") File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\posixbase.py", line 258, in _disconnectSelectable selectable.connectionLost(failure.Failure(why)) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\tcp.py", line 519, in connectionLost self._commonConnection.connectionLost(self, reason) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\internet\tcp.py", line 327, in connectionLost protocol.connectionLost(reason) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\protocols\tls.py", line 398, in connectionLost self._flushReceiveBIO() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\protocols\tls.py", line 295, in _flushReceiveBIO ProtocolWrapper.dataReceived(self, bytes) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twisted\protocols\policies.py", line 120, in dataReceived self.wrappedProtocol.dataReceived(data) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\twisted\websocket.py", line 291, in dataReceived self._dataReceived(data) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 1213, in _dataReceived self.consumeData() File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 1225, in consumeData while self.processData() and self.state != WebSocketProtocol.STATE_CLOSED: File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 1583, in processData fr = self.onFrameData(payload) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 1678, in onFrameData self._onMessageFrameData(payload) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\twisted\websocket.py", line 310, in _onMessageFrameData self.onMessageFrameData(payload) File "C:\Users\bc\AppData\Local\Programs\Python\Python37-32\lib\site-packages\autobahn\websocket\protocol.py", line 608, in onMessageFrameData self.frame_data.append(payload) builtins.AttributeError: 'NoneType' object has no attribute 'append'