Doesn't it work with Python?

Guys, I created a sample project but I am not able to make it work with Python: Glitch :・゚✧

Hi @arnonrdp, to make sure it will run automatically simply create a file called start.sh and insert the following:

python3 app.py

Hope this helps!

Hi @random.
It’s still returning the directory listing: https://delirious-leaf-launch.glitch.me/

$ python3 app.py
Traceback (most recent call last):
  File "app.py", line 1, in <module>
    import uvicorn
ModuleNotFoundError: No module named 'uvicorn'

To fix this, add a file called requirements.txt and add the following:

fastapi[all]
I looked at the fastapi docs and it said this would be the best one to use as it includes uvicorn as standard.

Then change your start.sh file so it looks like this:

pip3 install -r requirments.txt
python3 app.py

hopefully this will work.

1 Like

Worked perfectly!!
Thank you very much @random

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.