I tried to go back into Repl today and my file I thought I had created was no where to be found. I read that files were saved automatically? Help!
Hi @newhouseconnect !
You can try creating a new file with the same one as the deleted on: this will retrieve the code and put it back in the file.
Hope this helps!
I will give that a try but now I am noticing that when I have a file open in the Editor and then run it that the output is from an older file. How does that happen?
Hi @newhouseconnect , could you send a screen recording of the problem?
Could you also send the link to your repl?
here is the screen shot attached showing my program and the output from a previously opened program. How do I send a link of my Repl?
Is this it? https://replit.com/@newhouseconnect/Python
I took a look at the Repl you shared and noticed that is missing a main.py file. In the screenshot you shared, it shows a main.py file. Do you still see the main.py on your end, or did you change the files around since the screenshot?
Also, if you want to run a file other than main.py in Replit, you can edit the
run command of the
.replit file which will determine what the green “Run” button at the top does. Alternatively, you can run
python file.py in the shell (change
file.py to whatever file you want to run)
OP used this template so they will have to change the
entrypoint to the file they want to run.
Yes I changed the files around since the screenshot and deleted the main.py file. I set up a new replit account and plugged in my code and got it back running again. It is running as the main.py file now. Can I save it to a different name safely without running into these problems again and if so how?
Yes you can! You can edit the
run property in the
.replit file to whichever file you would like to be your main Python file and it should work. If you try that but are still having issues, please send me the link to the Repl and I would be happy to debug!