Пожалуйста, помогите мне с кодом ниже
Обратная трассировка (самый недавний призыв последнего):
File "C:\Users\kartik\Desktop\MY SQL GUI.py", line 78, in <module> label6=tkinter.Label(root, test='Selece Co', width=20) File "C:\Users\kartik\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 3143, in __init__ Widget.__init__(self, master, 'label', cnf, kw) File "C:\Users\kartik\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 2567, in __init__ self.tk.call( _tkinter.TclError: unknown option "-test"
Что я уже пробовал:
import tkinter from tkinter import * import mysql.connector top=tkinter.Tk() root = Tk() root.geometry('500x500') root.title('REGISTRATION FORM') fullname = StringVar() email = StringVar() var = IntVar() c = StringVar() var1 = IntVar() def db () : name1 = fullname.get() Email = email.get() Gender = var.get() Country = c.get() prog = var1.get() conn = mysql.connector.connect(host = 'localhost', user = 'root', password = 'tiger', database = 'REGISTER') cur=conn.cursor() cur.execute("INSERT INTO FORM VALUES ('{}','{}','{}','{}','{}')").format(name1,Email,Gender,Country,prog) cur.execute('oommit') label1 = tkinter.Label(root, text = 'REGISTRATION FORM' , width = 20) label1.place(x=90,y=53) label2 = tkinter.Label(root, text='Full Name',width=20) label2.place(x=80,y=130) entry1=tkinter.Entry(root,textvar=fullname) entry1.place(x=240,y=130) label3= tkinter.Label(root, text="Enter Email ID",width=20) label3.place(x=68,y=180) entry2= tkinter.Entry(root,textvar=email) entry2.place(x=240,y=180) label4= tkinter.Label(root,text='Gender',width=20) label4.place(x=70,y=230) radio1= tkinter.Radiobutton(root, text="Male",padx = 5, variable=var, value=1) radio1.place(x=235,y=230) radio2= tkinter.Radiobutton(root, text="Female",padx = 20, variable=var, value=2) radio2.place(x=290,y=230) label5= tkinter.Label(root, text='Country',width=20) label5.place(x=70,y=280) l1=['Canada','India','USA','Ireland','UK','South Korea']; drop1=tkinter.OptionMenu(root , c , *l1 ) drop1.config(width=15) c.set(' SELECT COUNTRY ') drop1.place(x=240,y=280) label6=tkinter.Label(root, test='Selece Co', width=20) label6.place(x=85,y=330) var2=IntVar() chek1=tkinter.Checkbutton(root, text='JAVA', variable=var1) chek1.place(x=235,y=330) chek2=tkinter.Checkbutton(root, text='PYTHON', variable=var2) chek2.place(x=290,y=330) button1=tkinter.button(root, text = 'Submit',width=20,command=db) button1.place(x=180,y=380) root.mainloop()
ZurdoDev
В чем заключается ваш вопрос?
Patrice T
Какая помощь ?
В чем заключается проблема/вопрос ?