I am running into unclear problems when trying to repeatedly calling my IB Historical Data download class. Cannot figure where exactly it lies. Please help. https://groups.io/g/twsapi/topic/is_there_a_problem_repeatedly/107016828
I dont see where you open a file and write to it. You can do this in python in a few lines of code https://ib-insync.readthedocs.io/recipes.html
There are codes that make a file and write data in the *saveData()* call right before closeConnection(). Inside the method, I used a BufferedWriter to write in a loop (data in a Queue). Given I am not creating threads (except the EReader.start()), I think the IO operations shouldn't cause problems?
I have manually run the main HistoricalDataDownloader.class repeatedly one right after the other, and it is working fine, but I get error in the 2nd loop of the script. The error seems to come from creating the downloader object in the 2nd loop. All parameters are the same as in the 1st except the ticker. I don't get why it happens....