-
First Check
Commit to Help
Example Codefrom fastapi import FastAPI
app = FastAPI()
@app.get("/items")
async def read_items():
return [{"name": "Foo"}] DescriptionI get a blank page Operating SystemWindows Operating System DetailsNo response FastAPI Version0.95.1 Python Version3.10.9 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You need to provide more context otherwise it makes it very difficult for people to help. Some things that come to mind
A blank page in what? A browser? What does the network tab in the developer tools tell you? What does the result look like if you call the endpoint with Curl?
Are you using a virtual environment (or something like docker) so you know the dependencies are correct? Do you see the connection logged by uvicorn when you make the request? Do you have any logging in your endpoint that you might use to log in the controller? |
Beta Was this translation helpful? Give feedback.
-
I get only a blank page (no docker) running on localhost:8000/docs. The code works fine on other machines, I tried different versions of python. different conda environments, but the same problem |
Beta Was this translation helpful? Give feedback.
-
Ok so a blank page for the docs. FastAPI Serves the Javascript for the docs from a CDN. It looks like your PC may not be able to load the javascript. You can open the network panel in chrome and see if the request is being blocked. |
Beta Was this translation helpful? Give feedback.
Ok so a blank page for the docs.
FastAPI Serves the Javascript for the docs from a CDN. It looks like your PC may not be able to load the javascript.
You can open the network panel in chrome and see if the request is being blocked.