Don't want to open new tab

Hi this is the code snippet of login page whenever it is successfully logged in it opens a new tab but when I’m trying to deploy it, it is not opening it, it show error that

Usage: streamlit run [OPTIONS] TARGET [ARGS]...
Try 'streamlit run --help' for he
Error: Invalid value: File does not exist: interface2.py

main.py code snippet
if st.button(“Login”):
if authenticate(email, password):
st.success(“You have successfully logged in!”)
subprocess.run([“streamlit”,“run”,“interface2.py”])
else:
st.error(“Incorrect email or password. Please try again.”)

Welcome aboard @Vedansh25! We’re thrilled to have you join us! :hugs:

The error message Error: Invalid value: File does not exist: interface2.py indicates that Streamlit cannot find interface2.py.

Can you please double-check that interface2.py exists in the same directory as your main application file (main.py), or specify the correct path to interface2.py?

Let me know how it goes :slight_smile:

Charly

Hi, yeah it’s in the same directory.

This is my github repo for this project

The new issue is that now it keeps on loading, I redeployed it after that it doesn’t even show an error

Glad the first issue has been resolved! :smiley:

Now does it keep loading on your local machine, or only when deployed?

Best,
Charly

How does one open the tab in the same window as the streamlit_navigation_bar using subprocess.run? It works fine when calling a bash or python process to generate the contents but it opens it in another browser window’s tab.
All I want to do is to open the contents in the same frame as the navigation bar.
Seems pretty standard - is this supported?
Thanks.

Hello,
Can someone answer this question or point me in the right direction?

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