Button instance has no _call_ method
<pre><code>    #AssessmentGUI
from Tkinter import *
window=Tk()
window.title('Troubleshooting')
def start():
    wet()
def wet():
    global wetlabel
    wetlabel=Label(window, text="Has the phone got wet? Y/N")

    wetsubmit()
def wetsubmit():
    wetlabel.pack()
    wetanswer=(entry.get())
    if wetanswer=="Y":
        print"ADD SOLUTION"
    else:
        dropped()
def dropped():
    global droppedlabel
    dropwindow.title('Troubleshooting')
    dropwindow.mainloop()
    droplabel=Label(dropwindow, text="Has the phone been dropped? Y/N")
    droplabel.pack()
    dropButton.pack()

    dropsubmit()

def dropsubmit():
    print "test"

window.geometry("300x100")
global wetsubmit
Button=Button(window, text="Submit Answer", activebackground="Green",command= wetsubmit , width=100)
dropwindow=Tk()
dropButton=Button(dropwindow, text="Submit Answer", activebackground="Green",command= dropsubmit , width=100)
entry=Entry(window, text="Test", width=100)
start()
entry.pack()
Button.pack()

window.mainloop()
</code></pre>

<p>Above is my code which isn't working due to the error. Basically what I want to happen is that each window opens another window after it for the next question on the troubleshooting program! If anyone has the task it would be nice if youy could suggest a better method if mine is unfixable.
The error message says:</p>

<pre><code>    Traceback (most recent call last):
  File "H:\GCSE\Computing\GUI.py", line 36, in &lt;module&gt;
    dropButton=Button(dropwindow, text="Submit Answer", activebackground="Green",command= dropsubmit , width=100)
AttributeError: Button instance has no __call__ method*
</code></pre>

<p>This is after a little bit of tweaking to the original code but I cannot fix this problem!</p>

<p>You have a class, named <code>Button</code>,and then you create a variable named <code>Button</code>. You have now destroyed the class, so the next time you try to create a button, you are calling your variable instead.</p>

<p>Lesson: don't use variable names that are the same as classes. </p>

python user-interface tkinter label call