Keep Getting uvicorn not found message
tmishra17
HOBBYOP

2 months ago

I am using the requriements.txt attached, not sure why it is giving me this error. I will also attach the commands I am using for the railway. The ones in the screenshot I am trying right now but the ones I have already tried are pip install -r requirements.txt, python -m uvicorn backend.server:app --host 0.0.0.0 --port 8080.

Let me know your guy's thoughts. Thanks!

$10 Bounty

9 Replies

2 months ago

Could you please share the full Railway build and runtime logs, With the full logs, it’ll be much easier to see whether this is missing dependency,wrong start command etc


bigdaddyaman

Could you please share the full Railway build and runtime logs, With the full logs, it’ll be much easier to see whether this is missing dependency,wrong start command etc

tmishra17
HOBBYOP

2 months ago

here are the screen shots. Please look on discord for the pictures as well


tmishra17

here are the screen shots. Please look on discord for the pictures as well

tmishra17
HOBBYOP

2 months ago

here is my requirements.txt file as well

Attachments


bigdaddyaman

Could you please share the full Railway build and runtime logs, With the full logs, it’ll be much easier to see whether this is missing dependency,wrong start command etc

tmishra17
HOBBYOP

2 months ago

Any comments?


Status changed to Open brody about 2 months ago


tmishra17
HOBBYOP

2 months ago

Can someone please answer my question?


vivek-jain-17
FREE

2 months ago

It looks like uvicorn isn't installed in the environment where your start command is running.

  1. Check requirements.txt: Make sure uvicorn is explicitly listed in your requirments.txt file.

  2. The Fix: If you are using a custom Start Command, Railway might not be using the virtual environment where your dependencies are installed. Try changing your Start Command to use the absolute path, or just prefix it with python -m: python -m uvicorn backend.server:app --host 0.0.0.0 --port $PORT

  3. Also, ensure your requirments.txt is in the root folder, or configure the Root Directory in your Service Settings if it's in a subfolder.


vivek-jain-17

It looks like uvicorn isn't installed in the environment where your start command is running.Check requirements.txt: Make sure uvicorn is explicitly listed in your requirments.txt file.The Fix: If you are using a custom Start Command, Railway might not be using the virtual environment where your dependencies are installed. Try changing your Start Command to use the absolute path, or just prefix it with python -m: python -m uvicorn backend.server:app --host 0.0.0.0 --port $PORTAlso, ensure your requirments.txt is in the root folder, or configure the Root Directory in your Service Settings if it's in a subfolder.

tmishra17
HOBBYOP

2 months ago

Did you look at my screenshots? I already have that in there. here is what my root directory looks like

This is what my spontaneous-hangouts folder looks like. Requirements.txt is in the root subfolder


2 months ago

I build Railpack. If you drop your build logs here and your full requirements.txt I can help


mikebianco

I build Railpack. If you drop your build logs here and your full requirements.txt I can help

tmishra17
HOBBYOP

2 months ago

here is the stuff attached


Loading...