【解決方法】[Error] チェックボタンを押すとアプリケーションが閉じます

[ad_1]

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")

編集者:

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 can cause this error that closes the application without further ado?

解決策 1

あなたが持っている唯一の手がかりは次の行です:

[Finished in 7.7s with exit code -5]

そのため、その終了コードがどこから来ているのか、それが何を意味するのかを調べる必要があります。

[ad_2]

コメント

タイトルとURLをコピーしました