how do i fix this error. (repl process died unexpectedly)
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
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()
You can fix this issue by putting the entire program into a
try: except:
block and running1/0
to raise an error. Since the program is in thetry: 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.
yea it worked thank you a lot for helping me (sorry im still kinda new)