No such file: main.py repl process died unexpectedly: exit status 2 ( a problem with flask )

Hello guys , I am not an expert , so pleae parddon on me. Please Help me with an issue in my code

The link to the relp is given below. This is an issue occurred while trying to create a website in Flask. Please check the whole relp carefully . The code is actually written by an expert and as I am learning from him, I was just copying step by step. The only difference was he was doing on VS Studio Code and I , On replit mobile app.

*Current Behavior : When I run the main.py file it showed an error : No such file: main.py repl process died unexpectedly: exit status 2

*Expected Behavior : The main.py should run without errors.

*Relp link : https://replit.com/@elementics8/Website?s=app

Hey @elementics8!

Just click the next to “Files” then click “Show hidden files”. Next click on the .replit file and finally you can change the entrypoint to whatever file you want to run. In this case, it’s Projects/main.py.
Screenshot 2023-07-28 at 3.02.21 PM

You can also change the second line from run="run_command_for_lang main.file_type" to run="run_command_for_lang fileIWantToRun.file_type", though it won’t have an effect for languages with interpreters as shown in the comment on line 1.

Dots

Show hidden files

edited

Also see the docs on how to configure a Repl: https://docs.replit.com/programming-ide/configuring-repl

if this post solved your problem, please mark it as the solution so people with the same issue can easily find the solution.

2 Likes

Try just moving the file out of the folder you put it in, that should work in this case.

Also, I recommend not using debug=True for sites ran on Replit, as that usually seems to cause issues.

2 Likes