OS module import fails

Cannot import correctly anything from os.path module and cannot use its functions like path.exists()
Ah, you're saying from aiofiles.os.path import exists doesn't work?
@Tinche yes, there was no way to import path from aiofiles.os and use its functions. I could fix it only by running pip install types-aiofiles
I had the same issue today. Installing types-aiofiles wouldn't help me though. Python 3.10.1
Same thing. Seeing this in mypy:
error: Module has no attribute "os" [attr-defined]
you need to
import aiofiles.os
I had to look into the sources to deduce it...
import aiofiles.os Traceback (most recent call last): File "
", line 1, in File "/data/data/com.termux/files/home/aiofiles-23.2.1/src/aiofiles/os.py", line 41, in link = wrap(os.link) ^^^^^^^ AttributeError: module 'os' has no attribute 'link'. Did you mean: 'unlink'?
I got this error. I tried to change a version,but it didn't work.