title: Getting "NotADirectoryError" Python
body: <p>I am trying to test an image as a background using pygame. I have been trying to fix this issue for a few days, and now have resolved to StackOverflow</p>
  <p>The line I have written to load the image:</p>
  <pre><code>back_ground = pygame.image.load(os.chdir(r&quot;C:\Users\zayaa\Desktop\GameSprites\L9.png&quot;))
  </code></pre>
  <p>I have used a directory but I get &quot;NotADirectoryError [WinError 267]&quot;</p>
  <p>I have already attempted the following:</p>
  <pre><code>back_ground = pygame.image.load(os.chdir(r&quot;C:\\Users\\zayaa\\Desktop\\GameSprites\\L9.png&quot;))
  back_ground = pygame.image.load(&quot;C:/Users/zayaa/Desktop/GameSprites/L9.png&quot;)
  back_ground = pygame.image.load(&quot;C://Users//zayaa//Desktop//GameSprites//L9.png&quot;)
  </code></pre>
  <p>Can someone please tell me how to fix this?</p>
  <p>Thank you,</p>
  <p>OP</p>