저는 파이썬으로 간단한 tkinter GUI를 만들고 있으며 배치 할 약 10 개 이상의 레이블이 필요합니다. 그리드 메서드를 사용하여 레이블을 배치하지만 일정량 후에 "TypeError : Label 개체를 호출 할 수 없습니다."라는 오류가 발생합니다. 다음은 라벨 및 격자 배치 코드입니다.Python tkinter 레이블을 호출 할 수 없습니다.
UnitPointLabel = ttk.Label(root, text = unit_points)
UnitLabel = ttk.Label(root, text = unit)
HQ1 = ttk.Label(root, text = "HQ:")
HQ2 = ttk.Label(root, text = "HQ:")
Elite1 = ttk.Label(root, text = "Elite:")
Elite2 = ttk.Label(root, text = "Elite:")
Elite3 = ttk.Label(root, text = "Elite:")
Troop1 = ttk.Label(root, text = "Troop:")
Troop2 = ttk.Label(root, text = "Troop:")
Troop3 = ttk.Label(root, text = "Troop:")
Troop4 = ttk.Label(root, text = "Troop:")
Troop5 = ttk.Label(root, text = "Troop:")
Troop6 = ttk.Label(root, text = "Troop:")
Fast_Attack1 = ttk.Label(root, text = "Fast Attack:")
Fast_Attack2 = ttk.Label(root, text = "Fast Attack:")
Heavy_Support1 = ttk.Label(root, text = "Heavy Support:")
Heavy_Support2 = ttk.Label(root, text = "Heavy Support:")
Heavy_Support3 = ttk.Label(root, text = "Heavy Support:")
UnitPointLabel.grid(row = 3, column = 7)
HQ1.grid(row = 3, column = 5)
HQ2.grid(row = 4, column = 5)
Troop1.grid(row = 5, column = 5)
Troop2.grid(row = 6, column = 5)
Troop3.grid(row = 7, column = 5)
Troop4.grid(row = 8, column = 5)
Troop5.grid(row = 9, column = 5)
Troop6.grid(row = 10, column = 5)
Fast_Attack1.grid(row = 11, column = 5)
Fast_Attack2.grid(row = 12, column = 5)
Stops working here: Heavy_Support1(row = 3, column = 6)
Heavy_Support2(row = 2, column = 6)
Heavy_Support3(row = 3, column = 6)
알다시피 나는 행과 열을 움직이려고했지만 여전히 작동하지 않는 것을 보았습니다. 왜 이런 일이 일어나는 지 아십니까?