https://prefect.io logo
Title
v

Vadym Dytyniak

09/15/2022, 10:48 AM
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()
.
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

Bianca Hoch

09/15/2022, 8:45 PM
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