Hello, anyone please suggest a code to resolve my long pending issue, I know this is simple, but really dont know how to do it. I am using a simple code to update the tick data to excel file, but frequently getting 1006 error (connection error). I know the reason is due to blocking "on_ticks" and need to offload the data export (to excel) task from "on_ticks" event using multithreading. but dont know how to do this. my code is given below, i really need help please..
[Kite Connect client : pykiteconnect] --------------------------------------------------------- from kiteconnect import KiteConnect from kiteconnect import KiteTicker import datetime import xlwings as xw
def read_excel(): for x in range(2, 146): name = sht.range('A'+str(x)).value if name == None: break token = int(sht.range('B'+str(x)).value) subscribe.append(token) trd_portfolio[token] = {"name": name, "row": x}
please dont give me the already existing threads of errors of multithreading.. i have gone through almost all threads and could not find proper resolution. I need some example code to implement multithreading on above code.