I cant run my code on replit and i keep getting "sh: 1: Use: not found" in my console tab

Im working on freecodecamp python project right now and when i try to run the code i get “sh: 1: Use: not found” in my console tab.
Here is the screenshot of my code and the console:

Try this:
Click on three dots and “show hidden files”.
Then open the .replit file.
In this file, delete the run variable, the whole line.
Alternatively, you could set the run variable to python3 main.py.

1 Like

When I set the run variable to python3 main.py i get this traceback:

and when I delete run I get this:


Did I do something wrong?

No, you didn’t do anything wrong.

The first error is a result of your program, not any replit configuration. Just install pytest with the packager in tools.

The second problem can be fixed too. You can delete the run variable and add a top-level entrypoint variable set to "main.py" (don’t forget the quotes), or any file you’d like. As the name suggests, entrypoint is the “entrypoint” file for the repl.

2 Likes

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