Hello. My question is not directly related to Pref...
# prefect-community
v
Hello. My question is not directly related to Prefect 2, but it worked fine with Prefect V1. I am getting the following RuntimeError on import because one of my modules tries to call
asyncio.get_event_loop()
.
Copy code
RuntimeError: There is no current event loop in thread 'AnyIO worker thread'.
Do you have any idea how to avoid it?
1
I think I have found the workaround. https://www.tornadoweb.org/en/stable/asyncio.html#tornado.platform.asyncio.AnyThreadEventLoopPolicy Do you have idea where I can set this policy before flow run?
b
Hi Vadym, glad you were able to find a workaround. I noticed that there was a GitHub issue opened in this related thread . I'm posting here just so that we know there was some progress made on this question.
👍 1