Ask coding questions

← Back to all posts
how do i fix this error. (repl process died unexpectedly)
hadthelad

so im nearly done with my game except for one error which is every time i for an example bust, its supposed to come up with a string saying that you busted, but it doesnt do that, instead it just comes up with this error

so if you guys could tell me how to fix it that would be very helpful.

here is the code:
https://repl.it/@hadthelad/blackjack

Answered by UniqueOstrich18 [earned 5 cycles]
View Answer
Voters
tomcoia
lizhenwang320
EVAINJILDANNYMI
OwasagiRinfu
TheBestTaran
AshlynnVong
CarlosCardona3
LutfurRahmanRah
JacksonTrump
portmanech
Comments
hotnewtop
UniqueOstrich18

You can fix this issue by putting the entire program into a try: except: block and running 1/0 to raise an error. Since the program is in the try: except: block, there will be no error message and the program will return and end.

Example:

Output:

Here's your fixed program: (I also removed some empty lines.)

If this was helpful, please mark it as the answer.

Note: You had a post about the same question that you deleted, which I had an answer in. I had to retype the entire comment here.

hadthelad

@UniqueOstrich18
yea it worked thank you a lot for helping me (sorry im still kinda new)

UniqueOstrich18

@hadthelad You're welcome

TheBestTaran

@hadthelad please do not spam your questions, does not matter replit or mail.

leon332157

@hadthelad Then you should avoid using exit() at all because of how repl.it detects a process running. You should use break in a while loop instead of exit() Also please don't spam multiple posts about the same question.

Scoder12

This happens whenever you use sys.exit and can't be avoided sadly.

sylashur

I don't see an issue regarding busting, the bust message comes up and then the error message comes up, if you don't want the error message you could use methods other than sys.exit()