#ERROR: Error loading ASGI app. Could not import module "main".
29 messages · Page 1 of 1 (latest)
ec32bf36-5c45-4445-a18f-b49ee929acf2
do you have a repo I could look at
what start command do you use when running this locally
poetry run dev
you should not be running anything in dev mode on railway
so in the dockerfile i should change
CMD poetry run dev
So i changed the previous line for the following one and it still returns the same error
CMD poetry shell
CMD uvicorn main:app --host 0.0.0.0 --port 8000
in your dockerfile you cd into the ta-lib folder, but never leave it, therefor uvicorn cant find your main.py file
also you should be using $PORT not 8000, you also dont need an EXPOSE keyword in your dockerfile
and you have a railway.json file with a defined start command, that start command overrides the CMD command in your dockerfile
let me know when these changes are done and ill take a look at your repo again
I did the changes you suggested and now I'm getting the error "$PORT is not a valid integer"
do you get the error in railway logs?
yes
show me your service variables please
just go back to using 8000 then
that will require you to add a service variable PORT = 8000
should i change $PORT for 8000 in railway.json too?
lol where else do you have $PORT
nowhere
bruh
yes i did
and i also said use 8000 instead of $PORT in the railway.json
back to "ERROR: Error loading ASGI app. Could not import module "main"."