[Python] FastAPI throws an error (Error loading ASGI app. Could not import module "api")

Discussão em 'Python' iniciado por Stack, Abril 25, 2025.

  1. Stack

    Stack Membro Participativo

    I tried to run FastAPI using uvicorn webserver but it throws an error.

    I run this command,

    uvicorn api:app --reload --host 0.0.0.0


    but there is an error in the terminal.

    Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
    Started reloader process [23445]
    Error loading ASGI app. Could not import module "api".
    Stopping reloader process [23445]

    Continue reading...

Compartilhe esta Página