Python Forum
[Tkinter] Takes 1 Positional Argument but 2 were Given
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Takes 1 Positional Argument but 2 were Given
#2
Try this and you'll see, that the command is called with one argument. The current Value.
import tkinter
root = tkinter.Tk()
tkinter.Scale(root, command=print, from_=0, to=200, orient=tkinter.HORIZONTAL).pack()
tkinter.Button(root, text='Close', command=root.destroy).pack()
root.mainloop()
Maybe you have forgotten to add the argument into your method. When there is only editingImage(self):, it's wrong.
The callback command is called with one argument.
Use instead editingImage(self, value): and do something with value in your editingImage method.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: Takes 1 Positional Argument but 2 were Given - by DeaD_EyE - Aug-08-2018, 06:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Kivy] Type error:takes 1 positional argument but 2 required hammer 3 2,788 Nov-09-2021, 06:01 AM
Last Post: deanhystad
  Syntax Error: Positional argument follows keyword argument Rama02 3 4,202 Feb-09-2021, 06:10 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020