Fixing ModuleNotFoundError: No module named 'tenacity._asyncio'
- Uninstall the current version of Tenacity:
- Install Tenacity version 5.1.5:
- Locate the
tenacity/_asyncio.py
file:
For example, on my machine, it was located at:
- Edit the function:
I can't remember the exact function name, so I usedmy_function
here. Replace:
with:
- Replace
yield from
withawait
:
Usectrl-f
to findyield from
(it appears twice) and replace both occurrences withawait
.