Unable to change how the RUN button works

Bug description:
I change the run key to streamlit run main.py but when I press the [RUN] button, it is still executing python main.py

Expected vs Current Behavior:
According to documentation, I am able to configure how the run button works by changing the run key

Steps to reproduce:

  1. Create a new repl.it
  2. Install streamlit and pandas
  3. See hidden files
  4. Change run key in .replit to streamlit run main.py

Bug appears at this link: https://replit.com/@ckunx/NumbYouthfulKeygenerator#.replit

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

Replit Profile: https://replit.com/@ckunx

2 Likes

I’ve the same problem with this repl : https://replit.com/@cldprv/Ositaut
More in depth topic about my error : .replit file not updating - #3 by cldprv

2 Likes

Can you provide the contents of your .replit file? That Repl appears to be private.

5 Likes

Here’s my .replit file:

entrypoint = "main.py"
modules = ["python-3.10:v18-20230807-322e88b"]

hidden = [".pythonlibs"]

[nix]
channel = "stable-23_05"

[deployment]
run = "streamlit run main.py"
deploymentTarget = "cloudrun"

I have also made my repl public.

1 Like

You changed the deployment run command, try copying that run command to the top of the file.

4 Likes

can you explain in more detail please? what exactly is to to? i tried copying that run command to the top of the file but still get

2024-02-20 00:28:58.374
Warning: to view this Streamlit app on a browser, run it with the following
command:

streamlit run main.py [ARGUMENTS]

Hey, please add a Secret from the secrets tab:
STREAMLIT_SERVER_PORT = 80
Otherwise the warning is telling you to do this

streamlit run main.py --server.port 80
1 Like

run will not work if you have an entrypoint. Remove that line.

I cannot confirm, entrypoint is for which file to be opened when you visit repl I thinks.

It also specifies the file for the interpreter, if there’s a functional one specified.

Run will take priority over entrypoint and modules.

Entrypoint specifies which file to run, for modules.

I think [interpreter] overrides run.

4 Likes

And specifies which file to first open in the editor.

Edit: oh I’m blind, 7heMech already said that

3 Likes

I could have sworn that that used to be the other way around…

3 Likes