title: I'm currently reading "Automate boring stuffs with Python" and I dont know why my auto add logo and resize image project doesnt work
body: <p>I'm new to code. So, to be honest, I dont know what I do wrong here</p>
  
  <pre><code>import os
  from PIL import Image
  
  SQUARE_FIT_SIZE = 900
  LOGO_FILENAME = "24h.png"
  
  logo = Image.open(LOGO_FILENAME)
  logoWidth, logoHeight = logo.size
  
  os.makedirs("withLogo", exist_ok=True)
  
  path = "/Users/mac/Desktop/水/71"
  for filename in os.listdir("path"):
  
      if not (filename.endswith('.png') or filename.endswith('.jpg')) \
              or filename == LOGO_FILENAME:
          im = Image.open(filename)
          width, height = im.size
          if width &gt; SQUARE_FIT_SIZE and height &gt; SQUARE_FIT_SIZE:
              if width&gt;height:
                  height = int((SQUARE_FIT_SIZE / width) * height)
                  width = SQUARE_FIT_SIZE
              else:
                  width = int((SQUARE_FIT_SIZE / height) * width)
                  height = SQUARE_FIT_SIZE
              print('Resizing %s...' % (filename))
              im = im.resize((width, height))
  
  print('Adding logo to %s...' % filename)
  im.paste(logo, (width - logoWidth, height - logoHeight), logo)
  
  im.save(os.path.join('withLogo', filename))
  </code></pre>
  
  <p>I expect the output will be a folder of added logo and resized images, but nothing happens as the code doesnt work.</p>