title: AttributeError: 'NoneType' object has no attribute 'blit' error problem
body: <p>I am trying to add an image to the screen but i keep getting this error:</p>
  
  <blockquote>
    <h3>AttributeError: 'NoneType' object has no attribute 'blit'</h3>
  </blockquote>
  
  <p>here is my code :</p>
  
  <pre><code>import pygame
  
  pygame.init()
  
  myscreen = pygame.display.set_mode((500, 500))
  myscreen = pygame.display.set_caption(("Mini game"))
  icon = pygame.image.load("images\space.png")
  pygame.display.set_icon(icon)
  
  playerImg = pygame.image.load("player.png")
  playerx = 200
  playery = 200
  
  def player():
      myscreen.blit(playerImg, (playerx, playery))
  
  running = True
  
  while running:
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              running = False
  
      player() 
  </code></pre>