title: Cannot Open Images With PyGame in Atom
body: <p>I am learning python using <a href="http://programarcadegames.com/index.php?lang=en&amp;chapter=bitmapped_graphics_and_sound" rel="nofollow noreferrer">this website</a></p>
  
  <p>I am trying to load an image like so:</p>
  
  <pre class="lang-none prettyprint-override"><code>background_image = pygame.image.load("background.jpg").convert()
  </code></pre>
  
  <p>I have found several other posts asking the same question, and all the answers are telling the poster to make sure the image is in the same folder as the <code>.py</code> file. Well, it is. I double checked.</p>
  
  <p>I also tried putting it into a subfolder called <code>'images'</code> and using this.</p>
  
  <pre><code>background_image = pygame.image.load(os.path.join("images","background.jpg")).convert()
  </code></pre>
  
  <p>In both cases I get the following error message.</p>
  
  <pre class="lang-none prettyprint-override"><code>pygame.error: Couldn't open saturn_family1.jpg
  </code></pre>
  
  <p>or </p>
  
  <pre class="lang-none prettyprint-override"><code>pygame.error: Couldn't open images\saturn_family1.jpg
  </code></pre>
  
  <p>When using the absolute path, it works. But shouldn't I be able to use a relative path like this?</p>
  
  <p>Also, this happens when using the <code>script</code> package to execute in Atom. But when executing the actual python file, it works. </p>
  
  <p>I am very frustrated, this doesn't seem to make any sense! What's going on?</p>
  
  <p>The full error message is:</p>
  
  <pre class="lang-none prettyprint-override"><code>C:\Users\Manu\Dropbox\Python\ProgramArcadeGames
  Traceback (most recent call last):
    File "C:\Users\Manu\Dropbox\Python\ProgramArcadeGames\Ch11\11_graphicsAndSound.py", line 26, in &lt;module&gt;
      background_image = pygame.image.load(os.path.join("images","saturn_family1.jpg")).convert()
  pygame.error: Couldn't open images\saturn_family1.jpg
  [Finished in 0.815s]
  </code></pre>
  
  <p>This is the <code>.py</code> directory:
  <a href="https://i.stack.imgur.com/kFfbr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kFfbr.jpg" alt="The &lt;code&gt;.py&lt;/code&gt; directory"></a></p>
  
  <p><a href="https://i.stack.imgur.com/6XOfw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6XOfw.jpg" alt="The &lt;code&gt;.py&lt;/code&gt; directory"></a></p>
  
  <p><strong>UPDATE:</strong>
  I ran the exact same code in sublime and it worked fine. I am assuming this is a problem with Atom, so I will just use Sublime from now on. Thanks to everyone who tried to help!</p>