エラーの指している意味が分からないです、、、。誰か教えてください!
エラー内容
python
1Exception in Tkinter callback 2Traceback (most recent call last): 3 File "C:\Users\Kazumi Kitazawa\Anaconda3\lib\tkinter\__init__.py", line 1705, in __call__ 4 return self.func(*args) 5 File "c:/Users/Kazumi Kitazawa/Desktop/dog_or_cat/Untitled-1.py", line 111, in done 6 entry.get() 7TypeError: get() missing 1 required positional argument: 'index1'
python
1import tkinter as tk 2 3root = tk.Tk() 4 5image_start = tk.PhotoImage(file=r"C:\Users\Kazumi Kitazawa\Desktop\dog_or_cat\title.png") 6image_nickname = tk.PhotoImage(file=r"C:\Users\Kazumi Kitazawa\Desktop\dog_or_cat\nickname.png") 7image_Question1 = tk.PhotoImage(file=r"C:\Users\Kazumi Kitazawa\Desktop\dog_or_cat\Question1.png") 8image_Question2 = tk.PhotoImage(file=r"C:\Users\Kazumi Kitazawa\Desktop\dog_or_cat\Question2.png") 9image_end = tk.PhotoImage(file=r"C:\Users\Kazumi Kitazawa\Desktop\dog_or_cat\Result_shindan.png") 10 11def add_dogpoint(): 12 global dogpoint 13 dogpoint += 10 14 15def add_catpoint(): 16 global catpoint 17 catpoint += 10 18 19 20dogpoint = 0 21catpoint = 0 22 23 24def end(): 25 page = tk.Toplevel(root) 26 page.title("診断結果") 27 canvas = tk.Canvas(page, width=1260, height=700) 28 canvas.create_image(630, 345, image=image_end) 29 canvas.pack() 30 def submit(): 31 page.destroy() 32 button = tk.Button(page, text="終了", font=("UD デジタル 教科書体 N - B", 40), fg="orange", command=submit) 33 button.place(x=550, y=600) 34 35 entry1 = tk.Text(page, width=25, height=1, font=("UD デジタル 教科書体 N - B", 60)) 36 entry1.place(x=350, y=200) 37 entry1.insert(entry+"は犬度"+dogpoint+"%、"+"猫度"+catpoint+"%です。") 38 39 entry2 = tk.Text(page, width=30, height=10, font=("UD デジタル 教科書体 N - B", 25)) 40 entry2.place(x=350,y=300) 41 42 page.protocol('WM_DELETE_WINDOW', submit) 43 44 45def Q2(): 46 page = tk.Toplevel(root) 47 page.title("犬系猫系女子診断第二問目") 48 canvas = tk.Canvas(page, width=1260, height=700) 49 canvas.create_image(630, 345, image=image_Question2) 50 canvas.pack() 51 def submit(): 52 page.withdraw() 53 end() 54 55 def done_Q2A(): 56 add_dogpoint 57 submit 58 59 def done_Q2B(): 60 add_catpoint 61 submit 62 63 Question2A_button = tk.Button(page, text="主導権を自分が持ちたい", font=("UD デジタル 教科書体 N-B", 30), fg="gray1", bg="lightskyblue1",command=done_Q2A) 64 Question2A_button.place(x=150, y=450) 65 66 Question2B_button = tk.Button(page, text="相手にリードしてもらいたい", font=("UD デジタル 教科書体 N-B", 30), fg="gray1",bg="lightskyblue1",command=done_Q2B) 67 Question2B_button.place(x=650, y=450) 68 page.protocol('WM_DELETE_WINDOW', submit) 69 70def Q1(): 71 page = tk.Toplevel(root) 72 page.title("犬系猫系女子診断第一問目") 73 canvas = tk.Canvas(page, width=1260, height=700) 74 canvas.create_image(630, 345, image=image_Question1) 75 canvas.pack() 76 def submit(): 77 page.withdraw() 78 Q2() 79 80 def done_Q1A(): 81 add_dogpoint 82 submit 83 84 def done_Q1B(): 85 add_catpoint 86 submit 87 88 Question1A_button = tk.Button(page, text="もちろんOK!", font=("UD デジタル 教科書体 N-B", 35), fg="gray1",bg="lightskyblue1",command=done_Q1A) 89 Question1A_button.place(x=230, y=450) 90 Question1B_button = tk.Button(page, text=" 嫌! ", font=("UD デジタル 教科書体 N-B", 35), fg="gray1",bg="lightskyblue1",command=done_Q1B) 91 Question1B_button.place(x=650, y=450) 92 page.protocol('WM_DELETE_WINDOW', submit) 93 94 95def diagnosis(): 96 page = tk.Toplevel(root) 97 page.title("ニックネーム入力") 98 canvas = tk.Canvas(page, width=1260, height=700) 99 canvas.create_image(630, 345, image=image_nickname) 100 canvas.pack() 101 entry = tk.Text(page, width=15, font=("UD デジタル 教科書体 N - B", 40)) 102 entry.place(x=430, y=530) 103 def submit(): 104 page.withdraw() 105 Q1() 106 107 def done(): 108 entry.get() 109 submit() 110 button = tk.Button(page, text="ニックネーム登録", font=("UD デジタル 教科書体 N - B", 40), fg="orange", command=done) 111 button.place(x=420, y=600) 112 page.protocol('WM_DELETE_WINDOW', submit) 113 114def start(): 115 page = root 116 page.title("犬猫系女子診断") 117 canvas = tk.Canvas(page, width=1260, height=700) 118 canvas.pack() 119 canvas.create_image(630, 345, image=image_start) 120 def submit(): 121 page.withdraw() 122 diagnosis() 123 button = tk.Button(page, text="診断する", font=("UD デジタル 教科書体 N-B", 40), fg="orange", command=submit) 124 button.place(x=550, y=590) 125 126start() 127root.mainloop() 128 129``
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。