I’ll be working in a Repl and then normally due to a failed package install attempt, i’ll end up with a broken environment where even Python fails to load. My approach so far has been to ZIP up my files and start a fresh Repl, but is there a better way to restore a Repl or revert to an earlier point?
Welcome to Ask! Here are all the methods I am aware of to repair broken repls:
- Fork the repl: It’s amazing how often this fixes the problem
- Copy the code to another repl: This is easy on basic programs (e.g., copying the entire contents of
main.pyon the broken repl to
main.pyon a new one), but becomes tedious on repls with more files.
- Use a community script: For Python repls, @firepup650 has created a script that you can run in the
Shellthat updates the repl config. It is possible that this may fix some errors. To use, run
curl -s https://firepup650.repl.co/minifier|bash -sin the
Shell. Note that since this is a community script it is not official and Replit is not responsible for it. However Firepup is a respected community member and Jr. Moderator on Ask so it should be trustworthy (I personally trust Firepup).
Should this script break and/or need an update, let me know! I’ll be happy to fix it.
Thanks! I’ll give that a try.