Skip to content

Bug: uvicorn.run() called with invalid debug=True argument — crashes on python app.py #9

Description

@anushagarg6

Description

backend/app.py starts uvicorn with debug=True:

uvicorn.run(app, host="0.0.0.0", port=5001, debug=True)

Uvicorn does not accept a debug parameter. This raises a TypeError when starting the server with python app.py directly.

Impact

The server cannot be started via python app.py. Only works if launched externally (e.g. via uvicorn app:app CLI), which is undocumented in the README.

Location

backend/app.py — the __main__ block at the bottom of the file.

Fix Applied (commit 2936cb5)

Replaced debug=True with reload=True (auto-reload on code changes) and log_level="debug" (verbose logging). Also changed the first argument from the app object to the "app:app" string, which is required for reload=True to work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions