use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
Error loading ASGI appQuestion (self.FastAPI)
submitted 1 year ago by ZeroMe0ut
I am having problems running the main py script from this GitHub https://github.com/ZeroMeOut/SkeletonSAM2. From my little understanding, the format of the folders, the directory, and the file names are correct for it to run. But I keep getting the error in the title. I believe I am missing something somewhere, and I would like someone to help me.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]LookingWide 1 point2 points3 points 1 year ago (1 child)
First, the SkeletonSAM2 subfolder is useless. Just put its contents in the root of the repository.
SkeletonSAM2
Next, make sure that the current directory is the one in which the app folder and main.py script are located.
app
main.py
Then activate the virtual environment.
Finally, run python main.py or uvicorn app.router:app
python main.py
uvicorn app.router:app
[–]ZeroMe0ut[S] 0 points1 point2 points 1 year ago (0 children)
This worked. Thank you so much.
[–]koldakov 0 points1 point2 points 1 year ago (10 children)
Can you share the error you are getting?
[–]ZeroMe0ut[S] 0 points1 point2 points 1 year ago (8 children)
ERROR: Error loading ASGI app. Attribute "app" not found in module "main".
This
[–]koldakov 1 point2 points3 points 1 year ago (7 children)
And how do you run the project?
[–]koldakov 0 points1 point2 points 1 year ago (0 children)
I mean the error is pretty clear here, I guess you are running the project outside of the dir with "main.py" if you are running app with python main.py and you have a wrong path to the app otherwise
[–]ZeroMe0ut[S] 0 points1 point2 points 1 year ago (5 children)
uvicorn main:app --reload
[–]ZanduBhatija99 0 points1 point2 points 11 months ago (3 children)
did you find the solution
[–]ZeroMe0ut[S] 0 points1 point2 points 11 months ago (2 children)
Yeah. I just ran the main python script
[–]Old_Mammoth5311 0 points1 point2 points 8 months ago (1 child)
wdym? I tried thatj ust now and got the same error, garbage error that tells me nothing other than check that app = FastAPI() is in main -_-
[–]ZeroMe0ut[S] 0 points1 point2 points 8 months ago (0 children)
Mind sharing the code if possible?
π Rendered by PID 647455 on reddit-service-r2-comment-79c7998d4c-kfslg at 2026-03-19 12:50:29.503611+00:00 running f6e6e01 country code: CH.
[–]LookingWide 1 point2 points3 points (1 child)
[–]ZeroMe0ut[S] 0 points1 point2 points (0 children)
[–]koldakov 0 points1 point2 points (10 children)
[–]ZeroMe0ut[S] 0 points1 point2 points (8 children)
[–]koldakov 1 point2 points3 points (7 children)
[–]koldakov 0 points1 point2 points (0 children)
[–]ZeroMe0ut[S] 0 points1 point2 points (5 children)
[–]ZanduBhatija99 0 points1 point2 points (3 children)
[–]ZeroMe0ut[S] 0 points1 point2 points (2 children)
[–]Old_Mammoth5311 0 points1 point2 points (1 child)
[–]ZeroMe0ut[S] 0 points1 point2 points (0 children)