Click here to Skip to main content
15,850,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello, I have a problem that I do not understand.

Everything works fine but sometimes the application crashes and closes (tkinter window) when clicking on the checkbuttom

What should it be?
It does not throw any code error or anything, it just closes the application without further ado and I get this in the editor:


Python
self.check_Tarjeta = IntVar()
		self.b_Tarjeta = Checkbutton(self.pagina1, text="TARJETA",font="Helvetica 15 bold", variable=self.check_Tarjeta)
		self.b_Tarjeta.place(x=650, y=400, width=200, height=30)

		### CHECK EFECTIVO ###
		self.check_Efectivo = IntVar()
		self.b_Efectivo = Checkbutton(self.pagina1, text="EFECTIVO",font="Helvetica 15 bold", variable=self.check_Efectivo)
		self.b_Efectivo.place(x=650, y=440, width=200, height=30)




Python
if self.check_Tarjeta.get() == 1 and self.check_Efectivo.get() ==1:
			MessageBox.showinfo("ERROR", "One 1", icon="error")
		elif self.check_Tarjeta.get() == 1:
			MessageBox.showinfo("ERROR", "TARJETA", icon="error")
		elif self.check_Efectivo.get() == 1:
			MessageBox.showinfo("ERROR", "EFECTIVO", icon="error")
		else:
			MessageBox.showinfo("ERROR", "Select", icon="error")



Editor:

Python
[Finished in 7.7s with exit code -5]
[cmd: ['python3', '-u', '/Users/tomas/Downloads/PROYECTO/main.py']]
[dir: /Users/tomas/Downloads/PROYECTO]
[path: /Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin]


What I have tried:

What can cause this error that closes the application without further ado?
Posted
Updated 19-Nov-22 21:56pm

1 solution

The only clue you have is the line:
[Finished in 7.7s with exit code -5]

So you need to find out where that exit code is coming from, and what it means.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900