Closed mpolavieja closed 5 months ago
Edit: I am not able to capture the error within my except clause, but If I delete my except clause, I am not able to capture the error using "disconnectedEvent" or "errorEvent" either (but I might be doing something wrong).
Since I was dealing with connection errors lately, a quick comment: I catch connection errors with the exact error name, in this case "ConnectionResetError", so this should work:
try:
...
except ConnectionResetError as error:
print(f"Exception {error}")
...
Hello,
I am using ib-insync 0.9.86 on a windows server 2022 machine. On the daily restart, I reconnect automatically to TWS using the following code (core is an object that inherits from IB class):
And below is the error I am always getting in the console (I've been unable to handle the error through the except clause). I am pretty sure there are no other instances of TWS running. Despite the error, everything seems to work properly, but I am not comfortable at all not knowing why this is happening and not being able to handle the error:
Thank you in advance for your help