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
#1
This is the code I have.

self.contrast = Scale(root, command=self.editingImage, from_= -100, to = 100, orient = HORIZONTAL)

I am trying to call the function editingImage(self) whenever the scale is moved, but python keeps giving me the error:

TypeError: editingImage() takes 1 positional argument but 2 were given

Why is this? I am only putting in one argument, self. At least I think I am?
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Kivy] Type error:takes 1 positional argument but 2 required hammer 3 2,712 Nov-09-2021, 06:01 AM
Last Post: deanhystad
  Syntax Error: Positional argument follows keyword argument Rama02 3 4,147 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