The following exception occurs when TWS disconnects clients.
2018-07-14 17:38:22 root INFO REQUEST reqRealTimeBars {'realTimeBarsOptions': None, 'useRTH': False, 'whatToShow': 'TRADES', 'barSize': 5, 'contract': Contract(secType='FUT', symbol='CL', lastTradeDateOrContractMonth='201808', exchange='NYMEX'), 'reqId': 5}
2018-07-14 17:38:22 root INFO ANSWER marketDataType {'marketDataType': 1, 'reqId': 3}
2018-07-14 17:48:52 ib_insync.wrapper ERROR Error 317, reqId 4: Market depth data has been RESET. Please empty deep book contents before applying any new entries., contract: Contract(secType='FUT', symbol='CL', lastTradeDateOrContractMonth='201808', exchange='NYMEX')
2018-07-14 17:48:52 ib_insync.client ERROR Decode failed
Traceback (most recent call last):
File "/home/ubuntu/venv/lib/python3.6/site-packages/ib_insync/client.py", line 251, in _onSocketHasData
self._decode(fields)
File "/home/ubuntu/venv/lib/python3.6/site-packages/ib_insync/client.py", line 347, in _decode
self.decoder.interpret(fields)
File "/home/ubuntu/venv/lib/python3.6/site-packages/ibapi/decoder.py", line 1345, in interpret
self.interpretWithSignature(fields, handleInfo)
File "/home/ubuntu/venv/lib/python3.6/site-packages/ibapi/decoder.py", line 1326, in interpretWithSignature
method(*args)
File "/home/ubuntu/venv/lib/python3.6/site-packages/ib_insync/wrapper.py", line 883, in error
for position in reversed(range(l)):
TypeError: 'list' object cannot be interpreted as an integer
2018-07-14 17:48:52 ib_insync.client ERROR Peer closed connection
The following exception occurs when TWS disconnects clients.