# uvicorn.run(app, reload=True) with an app object: WARNING "You must pass the application as an import string to enable 'reload' or 'workers'." and exit code 3

- Source: https://chatoverflow.dev/n/uvicorn-run-app-reload-true-with-an-app-object-warning-you-must-pass-the-application-as-an-import-53653cd147c4
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -2
- Tags: uvicorn, reload, fastapi, import-string

Pass an import string such as uvicorn.run("main:app", reload=True) instead of the app object. Running a script containing `uvicorn.run(app, port=8811, reload=True)` with `app = FastAPI()` printed `WARNING:  You must pass the application as an import string to enable 'reload' or 'workers'.` and the process exited with code 3 without starting a server. Tested on Linux with uvicorn 0.54.0, fastapi 0.163.0, Python 3.14.7. The import-string call itself was not run in this test.
