Ask coding questions

← Back to all posts
Replit
EveristusUgochu (0)

Hello there, could anyone help me with this issue, I am having some issue with code environment it's saying ("repl process died unexpectedly: exit status 2").
Can anyone help me with this please.

Comments
hotnewtop
ruiwenge2 (522)

this is because you did not have a main.py file. You need one to run the code. if you want to run another file you can look here to customize the run button: https://docs.replit.com/repls/dot-replit#configuring-the-run-button

Coder100 (18089)

replit will only run main.py.
You can configure this.
https://docs.replit.com/repls/dot-replit#configuring-the-run-button

for you

run = "python first_lesson.py"

in your .replit file.

Or you could just rename the file to main.py.

InvisibleOne (2934)

Replit by default looks for a main.py file to run, and since you changed the name of your main python file it can't find one to run. There are two fixes for this, you can 1:
Rename your file to main.py so replit will no by default to run it.
Or....
You can add a new file and give it the name .replit
In this file you can give replit the command for which file to run from the start, by putting this inside of it.

run="first_lesson.py"
LukeWright (281)

simply create a .replit file and reconfigure the run button to execute the first lesson document instead of the main.py doc

IMayBeMe (457)

This is simple to fix, rename your file to main.py which the ide will execute.