Won't run after file name change

I ran a python file succesfully. Then i decided to change the name.
Now it won’t run.
I tried to create a new file and copy and paste.
It’s still trying to run a file with the original name and saying main.py not found.

For the python reader to work, you must put the name Main.py

By renaming it, you would be creating a second document that would not be read as the head of the job.

That as an example.

We need more info like: was it the main.py and you used run, or did you use the shell?
Did you change a module file name and did nit change how it gets imported?

basically because it’s a python file, it’s defaulting to running a file named main.py. You can either change it to main.py or do this:

  1. press the three vertical dots (... but vertical) and press show hidden files
  2. go to the .replit file
  3. go to the second line (or run="python3 main.py") and change it to run="python3 YOUR_FILE.py"
  4. go to the sixth line (or entrypoint = "main.py") and change it to entrypoint = "YOUR_FILE.py"

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