title: kivy bind() takes exactly 2 positional arguments (0 given)
body: <p>I am building a elevator system GUI in python() with kivy. I'm writing it so that when an up-button of a floor is pressed, a function will be called, which will generate a request and send it to the system. I am now trying to bind the function to the up-button using:</p>
  
  <pre><code>self.floor1.up_button.bind(on_press=self.up_pressed(1))
  </code></pre>
  
  <p>And the compiler sends me an error:</p>
  
  <pre><code>TypeError: bind() takes exactly 2 positional arguments (0 given)
  </code></pre>
  
  <p>Is there a fix to it? Python beginner, so apologies if this is a really simple question.</p>
  
  <p>Here are the relevant codes in the .py file:</p>
  
  <pre><code>from kivy.uix.label import Label
  from kivy.uix.button import Button
  from kivy.app import App
  from kivy.uix.boxlayout import BoxLayout
  from kivy.uix.gridlayout import GridLayout
  from kivy.properties import ObjectProperty
  from random import randint
  
  class FloorRequestStatus:
      up = 0
      down = 1
  
  class Request:
      def __init__(self, start, status, destination, waiting_time):
          self.start = start
          self.status = status
          self.destination = destination
          self.waiting_time = waiting_time
  
  class Floor(GridLayout):
      up_count = NumericProperty(0)
      down_count = NumericProperty(0)
      floor_index = NumericProperty(0)
  
      up_button = ObjectProperty(Button)
      down_button = ObjectProperty(Button)
  
  class FloorSystem(BoxLayout):
      floor1 = ObjectProperty(Floor)  # type:Floor
      floor2 = ObjectProperty()
      floor3 = ObjectProperty()
      floor4 = ObjectProperty()
  
      floors = [floor1, floor2, floor3, floor4]
  
      request_queue = []
  
      def __init__(self, **kwargs):
          super(FloorSystem, self).__init__(**kwargs)
          self.floor1.up_button.bind(on_press=self.up_pressed(1))
  
      def generate_destination(self, floor_index, status):
          if status == FloorRequestStatus.up:
              return randint(floor_index + 1, 20)
          if status == FloorRequestStatus.down:
              return randint(0, floor_index - 1)
  
      def up_pressed(self, floor_index):
          a_request = Request(floor_index, FloorRequestStatus.up,
                          self.generate_destination(floor_index,FloorRequestStatus.up), 0)
          self.request_queue.append(a_request)
  </code></pre>
  
  <p>And these are the relevant codes in .kv file:</p>
  
  <pre><code>#:kivy 1.0.9
  
  &lt;Floor@GridLayout&gt;
      floor_index: 0
      pos: 200,200
      rows: 1
      spacing: 1
  
      GridLayout:
          size_hint_x: 35
          cols: 1
  
          Button:
              id: up_button
              size_hint_y: 50
              text: 'up'
              on_press: root.up_count += 1
  
          Button:
              id:down_button
              size_hint_y: 50
              text: 'down'
              on_press: root.down_count += 1
  
      Label:
          id: floor_label
          size_hint_x: 65
          text: root.label_text
          background_color: 1,1,1,1
          text: str(root.floor_index) + 'F (' + str(root.up_count) + ',' + str(root.down_count) + ')'
  
          canvas:
              Color:
                  rgba: .3, .5, 1, .4
              Rectangle:
                  size: self.size
                  pos: self.pos
  
  &lt;FloorSystem&gt;
      floor1: floor1
      floor2: floor2
      floor3: floor3
      floor4: floor4
  
      orientation: 'vertical'
      size_hint: None, None
      width: 160
      height: 700
      spacing: 2
  
      Floor:
          id: floor4
          floor_index: 4
  
      Floor:
          id: floor3
          floor_index: 3
  
      Floor:
          id: floor2
          floor_index: 2
  
      Floor:
          id: floor1
          floor_index: 1
  </code></pre>