How can I reconfigure the Run button?

Question:
I just created my account and for a project, I had to reconfigure the Run button. Before I configured it, I actually got normal results, but after I configured it, I got weird results such as the following : "run = “sh: 1: Use: not found”. How can I restore the Run button to its original function ?

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

Hey, @ncjones30 welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

https://replit.com/@ncjones30/boilerplate-rock-paper-scissors#RPS.py

Add this line at the top of .replit:
entrypoint = 'main.py'. It will run main.py.
Hope this helps!

1 Like

I put that at the top of the code, but that didn’t work.

open .replit file (it’s hidden, Show hidden files first) and replace all of it with this:

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

hidden = [".pythonlibs"]

[nix]
channel = "stable-23_05"

[unitTest]
language = "python3"

[deployment]
run = ["python3", "main.py"]
deploymentTarget = "cloudrun"
3 Likes

Thanks for the help. It worked!

I appreciate the help though.

you can mark my post as solution

@NuclearPasta0 How was that different from what I said?

first, just adding an entrypoint variable will not solve the issue because the run variable must also be removed
second, this is not really your fault but OP put the entrypoint variable inside of main.py instead of .replit
so I opted for a whole-file solution

At least on old repls, entrypoint overrode run in all cases if both were present.

that seems strange to me, because usually the entrypoint variable is always present
edit: it wasn’t entrypoint that overrode run, it was [interpreter]

[interpreter] itself didn’t override, it just told the repl how to override in a sense. entrypoint was, well, the actual file to override with. (From how I understand it)

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