Turns out the problem was simply that my python script was not named main
, and there was another python app main.py on the same working directory.
For anyone else who may face similar issues in the future:
Please note that the name of your python script should match the uvicorn.run("<filename>:app", ...)
part.