title: TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
body: <p>I got an error</p>
  
  <pre><code>TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
  </code></pre>
  
  <p>My code is the following</p>
  
  <pre><code>import os
  import cv2
  import random
  from pathlib import Path
  
  path = Path(__file__).parent
  path = "../img_folder"
  
  for f in path.iterdir():
  
      print(f)
      f = str(f)
      img=cv2.imread(f)
      line = random.randint(0, 50)
      img[3, 3, :] = line
      cv2.imwrite(path + "/" + "photo.png", img)
  </code></pre>
  
  <p>Traceback says a code of <code>cv2.imwrite~</code> is wrong. I really cannot understand why this is wrong. Is this type of path error? Or am I wrong to use this method? How should I fix this?</p>