erdewit / nest_asyncio

Patch asyncio to allow nested event loops
BSD 2-Clause "Simplified" License
693 stars 79 forks source link

Fatal Python error: Cannot recover from stack overflow. #41

Closed 0ihsan closed 3 years ago

0ihsan commented 3 years ago

I am trying to run a function (that triggers asyncio) infinite amount of times asynchronously. What am I doing wrong? See detailed error message: https://github.com/ihsanturk/twitter/issues/8

erdewit commented 3 years ago

If a function calls itself recursively without any bounds then that will overflow the stack.

Looks like twint should be used asynchronously instead (via the run coroutine).