title: TypeError: function() takes 1 positional argument but 2 were given
body: <p>Hi i am new to stack overflow and there maybe some issues on how i post this post.</p>
  <p>So i wanted to make a turtle spawn a clone of it self at where the mouse clicks, but every time i run the code and click on the mouse it throws me the the error:
  <code>TypeError: spawn() takes 1 positional argument but 2 were given</code></p>
  <p>I tried going over the code again but couldn't find the problem, and i decided to ask here.
  my code:</p>
  <pre><code>import turtle
  import pyautogui
  import tkinter as tk
  import keyboard
  
  wn = turtle.Screen()
  wn.title('Planner')
  wn.bgcolor('white')
  wn.setup(width=800,height=800)
  wn.tracer(0)
  
  #Turtle 5x0.25:
  block_5x025 = turtle.Turtle()
  block_5x025.speed(0)
  block_5x025.shape('square')
  block_5x025.color('black')
  block_5x025.shapesize(stretch_wid=5, stretch_len=0.25)
  block_5x025.penup()
  
  #Turtle 3x0.25
  block_3x025 = turtle.Turtle()
  block_3x025.speed(0)
  block_3x025.shape('square')
  block_3x025.color('black')
  block_3x025.shapesize(stretch_wid=3, stretch_len=0.25)
  block_3x025.penup()
  
  def clear_screen():
      wn.clear()
  
  def get_mouse_click_coor(x, y):
      turtle.onscreenclick(None)
      #block_5x025.goto(x,y)
      print(x, y)
  
  def motion(event):
      x, y = event.x, event.y
      print('{}, {}'.format(x, y))
      block_5x025.goto(x-400,-y+400)
      block_3x025.goto(x-400,-y+400)
  
  canvas = turtle.getcanvas()
  canvas.bind('&lt;Motion&gt;', motion)
  
  class Block:
      def __init__(self, size, thickness = 0.25, color = &quot;black&quot;):
          self.size = size
          self.thickmess = thickness
          self.color = color
  
      def spawn_block(self, block):
          i = 1
          for n in range(1):
              globals()[&quot;wall&quot; + str(i)] = block.clone()
              globals()[&quot;wall&quot; + str(i)].goto(block.xcor(),block.ycor())
              i += 1
  
  class Wall_5x025(Block):
      def __init__(self, size = 5, thickness = 0.25, color = &quot;black&quot;):
          super().__init__(size, thickness, color)
  
      def spawn(self):
          super().spawn_block(block_5x025)
  
  class Wall_3x025(Block):
      def __init__(self, size = 3, thickness = 0.25, color = &quot;black&quot;):
          super().__init__(size, thickness, color)
  
      def spawn(self):
          super().spawn_block(block_3x025)
  
  def turn():
      block_5x025.right(90)
      block_3x025.right(90)
  
  def switch():
      b3025 = 0
      b5025 = 1
      if keyboard.is_pressed('e'):
          b3025, b5025 = b5025, b3025
  
      if b3025 == 0:
          block_3x025.hideturtle()
      else:
          block_3x025.showturtle()
  
      if b5025 == 0:
          block_5x025.hideturtle()
      else:
          block_5x025.showturtle()
  
  while True:
      wn.update()
  
      wn.listen()
      turtle.onscreenclick(get_mouse_click_coor)
      wn.onkeypress(turn, 'r')
      wn.onkeypress(clear_screen, 'c')
      turtle.onscreenclick(Wall_5x025.spawn)
      switch()
  </code></pre>
  <p>also i am sorry if something is not written correctly or is not understandable...</p>