0

I have a simple code related to fastapi and uvicorn, where I want to reload the project but for some reason uvicorn can't find the attribute in the project, "Error loading ASGI app. Attribute "app" not found in module "main" ", Here it is the code in its entirety

from typing import Union
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
async def read_root():
    return {"Hello World!!!"}

In fact, he can identify the project but it's like he can't navigate inside it to find the attribute or something like that, please, some advice would be of great help, I've been with this for a couple of days and the solution is hard to find

  • 1
    What are your files named, how is uvicorn called, and most importantly... where is your traceback? – thebjorn May 17 '23 at 13:12

0 Answers0