title: takes from 3 to 5 positional arguments but 6 were given?
body: <p>My program is supposed to draw a chessboard using user input. The drawing has to occur with the call of draw(). I am getting an error:</p>
  
  <pre><code>line 18, in main
   chessboard = Chessboard(tr, startX, startY, eval(width),  val(height)) 
  TypeError: __init__() takes from 3 to 5 positional arguments but 6 were given
  </code></pre>
  
  <p>The thing is that my <strong><em>main module cannot change</em></strong>. I have to leave it as it is. It's a requirement. So, how can I solve that problem when I cannot change a thing from it? It only gives me an error on line 18. </p>
  
  <p>main module:</p>
  
  <pre><code>import turtle
  from chessboard import Chessboard
  
  def main():
      startX, startY = eval(input("Enter a starting point: "))
      width = input("Input a width: ")
      height = input("Input a height: ")
  
      tr = turtle.Turtle()
  
      if width == "" and height == "":
          chessboard = Chessboard(tr, startX, startY)
      elif height == "":
          chessboard = Chessboard(tr, startX, startY, width=eval(width))
      elif width == "":
          chessboard = Chessboard(tr, startX, startY, height=eval(height))
      else:
          chessboard = Chessboard(tr, startX, startY, eval(width), eval(height))
  
          chessboard.draw()
  
          tr.hideturtle()
          turtle.done()
  
  main()
  </code></pre>
  
  <p>I leave my chessboard.py module in case it has to do something with it:</p>
  
  <pre><code>import turtle
  
  
  class Chessboard:
      def __init__(self, startX, startY, width=250, height=250):
          self.__startX = startX
          self.__startY = startY
          self.__width = width
          self.__height = height
  
      def draw(self, __startX, __startY, __width=250, __height=250):
          turtle.clear
          self.__drawChessboard(__startX, __startY, __width, __height)
  
      def __drawChessboard(self, __startX, __startY, __width=250, __height=250):
          # uses height x width, default 250
          turtle.setheading(0)  
          turtle.penup() 
          turtle.goto(__startX, __startY) 
          turtle.pendown() 
          turtle.goto(__startX + __width, __startY)
          turtle.goto(__startX + __width, __startY + __height)
          turtle.goto(__startX, __startY + __height)
          turtle.goto(__startX, __startY)
  
          self.__drawAllRectangles(self, __startX, __startY, __width, __height)
  
          turtle.exitonclick()
  
      def __drawAllRectangles(self, __startX, __startY, __width, __height):
          __checkerWidth = __width / 8
          __checkerHeight = __height / 8
          for row in range(8):
              for column in range(4):
                  if row % 2 == 0:
                      self.__drawRectangle(self, __startX + (2 * column * __checkerWidth),
                                           __startY + (row * __checkerHeight), __checkerWidth, __checkerHeight)
                  else:
                      self.__drawRectangle(self, __startX + __checkerWidth + (2 * column * __checkerWidth),
                                           __startY + (row * __checkerHeight), __checkerWidth, __checkerHeight)
  
      def __drawRectangle(self, __startX, __startY, __checkerWidth, __checkerHeight):
          turtle.penup()
          turtle.setheading(0)
          turtle.goto(__startX, __startY)
          turtle.fillcolor("black")
          turtle.begin_fill()
          turtle.pendown()
          turtle.goto(__startX + __checkerWidth, __startY)
          turtle.goto(__startX + __checkerWidth, __startY + __checkerHeight)
          turtle.goto(__startX, __startY + __checkerHeight)
          turtle.goto(__startX, __startY)
          turtle.end_fill()
  </code></pre>
  
  <p>Thanks for your help!</p>