Replies: 3 comments
-
It appears to work fine on Fedora, but duplicating in a new directory with a new venv and using pip install with --no-cache-dir doesn't improve the situation on osx. |
Beta Was this translation helpful? Give feedback.
-
I ran into the same or similar (?) issue. As you can see from your posted error message, starlette cannot find module aiofiles.
In my case aiofiles was missing completely. There seems to be a bug in old version of starlette: starlette fails to define package dependency on aiofiles, but uses it! You listed aiofiles==0.8.0 - are you sure that the package was installed in the python (virtual) environment that you were using to execute the fastapi application? The bug in starlette was maybe accidentally fixed when starlette replaced aiofiles with anyio. See encode/starlette#1157 |
Beta Was this translation helpful? Give feedback.
-
i just ran across this, is the fix still just to install aoifiles? or is there a feature of fastapi that needs to be enabled? |
Beta Was this translation helpful? Give feedback.
-
First Check
Commit to Help
Example Code
Description
Attempt to run the file with uvicorn:
Operating System
macOS
Operating System Details
FastAPI Version
0.70.0
Python Version
Python 3.8.7
Additional Context
I'm just trying to follow the tutorial at https://fastapi.tiangolo.com/advanced/templates/.
I can do the import interactively from a python terminal, but it fails when using uvicorn.
Beta Was this translation helpful? Give feedback.
All reactions