Cant launch my app

Hi I’m new to coding and have just read about stremlit which seems awesome, I have been able to launch the streamlit hello app for the demos successfully, but when I try to launch my own, I get the following error:
Usage: streamlit run [OPTIONS] TARGET [ARGS]…

Error : Invalid value : File does not exist : app.py

I know it might be a trivial question for all the advanced people here, but I would appreciate the help so I can start my exploration.

Regards
Ntg

Hello @Ntg, welcome to the forums :slight_smile:.

Well you got the demo working, which is great ! Now for your case, if you are running streamlit run app.py, Streamlit will you look for a file app.py in the folder the terminal is running in, and from the error File does not exist: app.py it seems it could not find the file.

Don’t forget to create such a file in the folder where your terminal is running . On Windows the folder you are in should be written the line before, on Unix, you can type pwd to see the folder it’s in.
If you managed to create your script app.py, you should see the file in the terminal using the dir command in Windows/ls command in Unix in the list of files in your terminal.

Then for example you can write the following code in the app.py file, using Notepad++ or Notepad :

import streamlit as st 

st.header("Hello world !")
st.balloons() 

and hopefully Streamlit will pop out and cheer you with balloons when you run the command.

We can help you a bit more if you specify on which OS you are running, if you are using Anaconda Navigator to manage your packages, and how you installed Streamlit, so don’t hesitate to provide us more information about your setup.

Hi thanks for your quick response, I’m using windows 10, and using VS Code, hope this is useful or is there any other information you need?

If you are using VSCode, you may also want to check this guide on configuring VSCode to run the active script.

Thank you for your assistance, sorted am good to start exploring

1 Like