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:
- press the three vertical dots (
...
but vertical) and press show hidden files - go to the
.replit
file - go to the second line (or
run="python3 main.py"
) and change it torun="python3 YOUR_FILE.py"
- go to the sixth line (or
entrypoint = "main.py"
) and change it toentrypoint = "YOUR_FILE.py"
3 Likes
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.