title: Python(Pygame) Key Error
body: <p>I am making a game in pygame using a tilemap, and I've encountered the follwing error </p>
  
  <pre><code>"Traceback (most recent call last):
      File "C:\Users\Dusty\Dropbox\~MAIN FOLDER~\Projects\Sunless\game.py", line 52, in &lt;module&gt;
      surface.blit(textures[tileMap[row][column]], (column*tileSize, row*tileSize, tileSize, tileSize))
  KeyError: 174"
  </code></pre>
  
  <p>With this code:</p>
  
  <pre><code>import pygame
  
  gameIsRunning = True
  
  tileSize = 32
  mapHeight = 19
  mapWidth = 25
  
  surface = pygame.display.set_mode((tileSize * mapWidth, tileSize * mapHeight))
  pygame.display.set_caption("Game")
  
  floor = 109
  wall = 166
  
  textures = {
              floor : pygame.image.load('data/floor.png'),
              wall: pygame.image.load('data/wall.png'),
  
              }
  
  tileMap = [
             [109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109],
             [109, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 109, 166, 166, 166, 166, 166, 166, 166, 166, 109],
             [109, 166, 109, 109, 109, 109, 109, 109, 109, 166, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 166, 109, 109, 109],
             [109, 166, 109, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 109, 166, 109],
             [109, 166, 109, 166, 109, 109, 109, 109, 109, 166, 109, 109, 109, 109, 109, 109, 166, 109, 166, 109, 109, 166, 109, 166, 109],
             [109, 166, 109, 166, 109, 166, 166, 166, 109, 166, 166, 166, 166, 166, 166, 109, 166, 109, 166, 166, 166, 166, 166, 166, 109],
             [109, 166, 166, 166, 166, 166, 109, 166, 166, 166, 109, 109, 166, 109, 166, 109, 166, 109, 166, 109, 166, 166, 109, 166, 109],
             [109, 166, 109, 166, 109, 166, 109, 109, 109, 166, 166, 166, 166, 109, 166, 109, 166, 166, 166, 166, 109, 166, 109, 166, 109],
             [109, 166, 109, 166, 109, 166, 166, 166, 166, 166, 109, 109, 166, 109, 166, 166, 166, 109, 166, 109, 166, 166, 109, 166, 109],
             [109, 166, 109, 166, 109, 166, 109, 166, 109, 166, 109, 109, 166, 109, 166, 109, 166, 109, 166, 166, 109, 166, 109, 166, 109],
             [109, 166, 109, 166, 109, 166, 166, 166, 109, 166, 166, 166, 166, 166, 166, 109, 166, 109, 166, 109, 166, 166, 109, 166, 109],
             [109, 166, 109, 166, 109, 109, 109, 166, 109, 166, 109, 166, 109, 109, 166, 109, 166, 109, 166, 166, 109, 166, 166, 166, 109],
             [109, 109, 109, 166, 166, 166, 166, 166, 166, 166, 109, 166, 109, 109, 166, 109, 166, 109, 166, 109, 109, 166, 109, 109, 109],
             [109, 166, 109, 166, 109, 109, 166, 109, 109, 166, 109, 166, 109, 166, 166, 109, 166, 109, 166, 109, 109, 166, 109, 166, 109],
             [109, 166, 109, 166, 109, 109, 166, 109, 109, 166, 109, 166, 166, 166, 109, 109, 166, 109, 166, 109, 109, 166, 109, 166, 109],
             [109, 166, 109, 166, 166, 166, 166, 166, 109, 166, 109, 166, 166, 109, 109, 166, 166, 109, 166, 109, 109, 166, 109, 166, 109],
             [109, 166, 109, 109, 109, 109, 109, 166, 109, 166, 166, 166, 166, 166, 166, 166, 166, 109, 166, 109, 109, 174, 166, 166, 109],
             [109, 166, 166, 166, 166, 166, 166, 166, 166, 166, 109, 109, 109, 109, 166, 166, 166, 109, 166, 166, 166, 166, 109, 166, 109],
             [109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109]
              ]
  
  def gameQuit():
      pygame.quit()
      quit()
  while gameIsRunning == True:
      surface.fill((0, 0, 0))
  
      for row in range(mapHeight):
          for column in range(mapWidth):
              surface.blit(textures[tileMap[row][column]], (column*tileSize, row*tileSize, tileSize, tileSize))
  
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              gameQuit()
  </code></pre>