Closed gp-slick-coder closed 4 years ago
The error indicates that another new event loop has been created. For example asyncio.run
does this. My suggestion would be to make sure to use only one event loop.
In the stack of tornado + ib_insync there should be no need for nest-asyncio btw, it can be made full async.
Thanks, you are right! I removed nest_asyncio.apply()
and changed the synchronous function qualifyContracts
to qualifyContractsAsync
. Everything works fine now :-) Also tornado 6.* is working... lol, what a day^^
Just to let you know.
I got the following error with nest-asyncio 1.3.0: RuntimeError: Cannot run the event loop while another loop is running
Working libs with tornado are: nest-asyncio==1.2.3 tornado==5.1.1 ib_insync==0.9.59