title: FileNotFoundError: [Errno 2] No such file or directory: error
body: <p>I'm looping through many folders to get any JSON file in each folder using the following code:</p>
  
  <pre><code>def get_all_jobs():
      for root_dir, _, file_names in os.walk(r'path'):
          for file_name in file_names:
              if file_name.endswith('.json'):
                  all_files = (f'{root_dir}/{file_name}')
                  for file in all_files:
                      with open(file_name, 'r', encoding="utf8") as json_file:
                          read_content = json.loads(json_file.read())
  </code></pre>
  
  <p>and I get this error :</p>
  
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory:
  </code></pre>
  
  <p>and don't have one path to one folder to give but I have many folders in which I have the files. How can I solve this? </p>