Fixing ModuleNotFoundError: No module named 'tenacity._asyncio'
- Uninstall the current version of Tenacity:
- Install Tenacity version 5.1.5:
- Locate the
tenacity/_asyncio.pyfile:
For example, on my machine, it was located at:
- Edit the function:
I can't remember the exact function name, so I usedmy_functionhere. Replace:
with:
This converts the two lines into one line. - Replace
yield fromwithawait:
Usectrl-fto findyield from(it appears twice) and replace both occurrences withawait.