title: Pygame - RuntimeError: maximum recursion depth exceeded while calling a Python object
body: <p>When ever I try to run my code I constantly get this error:</p>
  
  <pre><code>RuntimeError: maximum recursion depth exceeded while calling a Python object
  </code></pre>
  
  <p>I am quite confused to why this happens, I am trying to make a picture blit and constantly move down the screen, as an object that the player has to dodge and if hits gets "killed" (Still to add collisions in). When I start to get the error is spams the shell with this:</p>
  
  <pre><code>File "C:\Users\John\Desktop\Michael\V'Room External\GAME_MAIN_.py", line 195, in movement
      fallingObject()
  File "C:\Users\John\Desktop\Michael\V'Room External\GAME_MAIN_.py", line 206, in fallingObject
      movement()
  File "C:\Users\John\Desktop\Michael\V'Room External\GAME_MAIN_.py", line 160, in movement
      print(x)
  File "C:\Python34\lib\idlelib\PyShell.py", line 1352, in write
      return self.shell.write(s, self.tags)
  RuntimeError: maximum recursion depth exceeded while calling a Python object
  </code></pre>
  
  <p>The relevant code is:</p>
  
  <pre><code>def movement():
      crashed = False
      while not crashed:
          print(x)
          ...
          if x &lt; -10:
                x = -10
          else:
              if x &gt; 490:
                  x = 490
              else:
                  fallingObject()
  
  
  
  def fallingObject():
      global w
      w = 20
      global o_x
      o_x = random.randrange(0,width)
      objectSpawn = True
      while objectSpawn:
          movement()
      ...
  </code></pre>