title: Pygame does not let me open images
body: <p>I am currently following a youtube series by Meloonatic Melons. I am trying to create textures for my game tiles. <a href="https://www.youtube.com/watch?v=tDgUWg8IiuQ&amp;t=1s" rel="nofollow noreferrer">This is the video</a> I am currently watching. </p>
  
  <p>My code spits out an error message saying that pygame could not open the image. I looked online and most of them said to make sure the image file was in the same working directory, so I placed the Python code in the same folder where I stored my images. Some also said to enter the full file path, but that also results in an error.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import pygame
  import os
  cwd = os.getcwd()
  
  pygame.init()
  
  class Tiles:
  
      Size = 32
  
      def  Load_Texture(file, Size):
          bitmap = pygame.image.load(file)
          bitmap = pygame.transform.scale(bitmap, (Size,Size))
          surface = pygame.Surface((Size,Size), pygame.HWSURFACE|pygame.SRCALPHA)
          surface.blit(bitmap, (0,0))
          return surface
  
      print(cwd)
      Grass = Load_Texture("graphics\\grass.png", Size)
  </code></pre>
  
  <p>This is the error that would be spit out:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\kylem\Desktop\First Python Game\scripts\textures.py", line 7, in &lt;module&gt;
      class Tiles:
    File "C:\Users\kylem\Desktop\First Python Game\scripts\textures.py", line 19, in Tiles
      Grass = Load_Texture("scripts\\grass.png", Size)
    File "C:\Users\kylem\Desktop\First Python Game\scripts\textures.py", line 12, in Load_Texture
      bitmap = pygame.image.load(file)
  pygame.error: Couldn't open scripts\grass.png
  </code></pre>
  
  <p>I placed the image and code in the same folder 
  and also if I put the full file name like so:</p>
  
  <pre><code>Grass = Load_Texture("C:\Users\kylem\Desktop\First Python Game\scripts\grass.png", Size)
  </code></pre>
  
  <p>I get an error pop up that says: </p>
  
  <p><img src="https://i.stack.imgur.com/85kFZ.png" alt="the error pop up"></p>