Difficulty Stopping Programs Automatically on Replit

Question: Difficulty Stopping Programs Automatically on Replit: I’m encountering an issue with Replit where my programs aren’t automatically stopping , when I print hello output is ok but I have to stop the programme mannually by cliking stop button

Replit Profile: https://replit.com/@SunnyBoyath

1 Like

Welcome to Ask! could you please provide the link to your repl so we can take a look?

2 Likes

Ah yes! Sometimes, even when the program has ended, the button goes back to the Run side but then goes back to Stop and will run the program again; the cycle loops at least 4 times, or until I get fed up and quickly press Stop before it goes to Run.

1 Like

Why it’s not stopping on its own after running the program?
every time after clicking RUN we have to click again to STOP it.
So then we have to click again to rerun the program.

Welcome to Ask @suryakantabachh! Repls aren’t really supposed to stop on a schedule. They’ll go to sleep eventually but they don’t just stop. Could you provide the link to your repl so we can take a look?

1 Like

I’m doing 100 days of code and have the same issue. Always have to hit Stop to rerun the program. Seems to be stuck in debug mode - there is a prompt after the output in the console where I can type expressions.

This is intended behaviour, this is not a bug. After you run, the console essentially turns into a Python interpreter. The default Python template does not have this feature if you are looking to get around it.

2 Likes

thanks, Matt - if I want to install that default template is it possible to do it for rest of 100 days problems?

Isn’t 100DoC repls also converted to the new Console?

The change in the look of the console is mostly UI, the old 100 DoC Repls are the same as the Python (with Prybar) template, I believe.

If you’re asking if there’s a way to change what template the 100 DoC Repls use, as far as I know, the answer is no. To remove the interpreter you can remove lines 16 to 27 from .replit, which should look like this:

[interpreter]
  [interpreter.command]
  args = [
    "stderred",
    "--",
    "prybar-python3",
    "-q",
    "--ps1",
    "\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",
    "-i",
  ]
  env = { LD_LIBRARY_PATH = "$PYTHON_LD_LIBRARY_PATH" }

If it isn’t the same line in some lessons, just search for the [interpreter] section and delete everything below that is indented until the next [thing].

1 Like

I’ve seen the repls on the course now, they’ve changed to the current Console.

Sorry, but what will this do?

It will remove the interpreter from the console, which IIRC is the thing being problematic here.

1 Like

Erm okay ig but why do you want to remove the interpreter @scottedwards200 ?

The interpreter has a bug where exiting the program with something like exit() will not stop the program I think.

Pasting in the .replit file from a new python repl should work I think. Deleting the replit.nix file is possible too.

1 Like

Bug description:
Console crash

Expected vs Current Behavior:
my code doesn’t work in the interpret section even tho i close and open the page again or use the app.

Steps to reproduce:
i tried to do only 1 print function to see if there’s something wrong with my code, still happens

Bug appears at this link: https://replit.com/@umutakyuzid/day17100-days

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 OPR/105.0.0.0
opera gx and application

Replit Profile: https://replit.com/@umutakyuzid

Hi @umutakyuzid , welcome to the forums!
In what way does it not work?
Could you try entering kill 1 in the Shell?

kill 1 in the she clears my probem thnks

Hey @SunnyBoyath!

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

cc: @QwertyQwerty88 @dragonhunter1 @MattDESTROYER @Firepup650

1 Like