title: tkinter TypeError: missing 1 required positional argument:
body: <p>I´m new to python and practicing, and I have now written this piece of coding, but I´m getting an error I do not know how to resolve, could someone help me please?</p>
  
  <p>This is my code:</p>
  
  <pre><code>from tkinter import *
  
  root = Tk()
  
  name = 'donut'
  
  def printInput(event, name):
      print("Your name is %s, and you are years old." % (name))
  
  button_1 = Button(root, text="Submit")
  button_1.bind("&lt;Button-1&gt;", printInput)
  button_1.pack()
  
  root.mainloop()
  </code></pre>
  
  <p>And when I click on submit, I get this error:</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Users\error\AppData\Local\Programs\Python\Python36-32\lib\tkinter\__init__.py", line 1699, in __call__
      return self.func(*args)
  TypeError: printInput() missing 1 required positional argument: 'name'
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks!</p>