title: OSError:[Errno 22] with open() trying to use Exifread
body: <p>Trying to extract exif data from one image.
  I am not a developer - I got this code from a web example.
  Very much learning.</p>
  <pre><code>def process_img(path):
      f = open('C:\\Users\\evansg\\Desktop\\Photos_for_fun\\PestMonitoring_BTT003_20200527_RCNX1446.jpg/', 'rb')
      tags = exifread.process_file(f)
      info = {
          'Image DateTime': tags.get('Image DateTime', '0'),
          'GPS GPSLatitudeRef': tags.get('GPS GPSLatitudeRef', '0'),
          'GPS GPSLatitude': tags.get('GPS GPSLatitude', '0'),
          'GPS GPSLongitudeRef': tags.get('GPS GPSLongitudeRef', '0'),
          'GPS GPSLongitude': tags.get('GPS GPSLongitude', '0')
      }
      return info
  
  info = process_img('PestMonitoring_BTT021_20200414_RCNX3611.jpg')
  print(info)
  </code></pre>
  <p>Error is:</p>
  <hr />
  <pre><code>OSError                                   Traceback (most recent call last)
  &lt;ipython-input-6-20569c66d6b9&gt; in &lt;module&gt;
        8     return info
        9 
  ---&gt; 10 info = process_img('PestMonitoring_BTT003_20200527_RCNX1446.jpg')
       11 print(info)
  
  &lt;ipython-input-6-20569c66d6b9&gt; in process_img(path)
        1 def process_img(path):
  ----&gt; 2     f = open(&quot;C:\\Users\\evansg\\Desktop\\Photos_for_fun\\PestMonitoring_BTT003_20200527_RCNX1446.jpg/&quot;, 'rb')
        3     tags = exifread.process_file(f)
        4     info = {
        5         'Image DateTime': tags.get('Image DateTime', '0'),
  
  OSError: [Errno 22] Invalid argument: 'C:\\Users\\evansg\\Desktop\\Photos_for_fun\\PestMonitoring_BTT003_20200527_RCNX1446.jpg/'
  </code></pre>
  <p>However:</p>
  <pre><code> entries = os.listdir('C:\\Users\\evansg\\Desktop\\Photos_for_fun/')
  for entry in entries:
      print(entry)
  </code></pre>
  <p>Returns a list that includes desired file.
  example:</p>
  <pre><code>IMG_0001.JPG
  IMG_0251.JPG
  IMG_0285.JPG
  PestMonitoring_BRT011_20200204_IMG_0124.jpg
  PestMonitoring_BRT011_20200329_IMG_0410.jpg
  PestMonitoring_BRT011_20200406_IMG_0685.jpg
  PestMonitoring_BRT012_20200119_IMG_0031.jpg
  PestMonitoring_BRT014_20200221_IMG_0297.jpg
  PestMonitoring_BRT014_20200312_IMG_0401.jpg
  PestMonitoring_BRT015_20190901_IMG_1340.jpg
  PestMonitoring_BRT015_20190929_IMG_8585.jpg
  PestMonitoring_BRT016_20190817_IMG_0075.jpg
  </code></pre>
  <p>Further, I would like to expand this to include multiple folders. Advice would be greatly appreciated.
  Thanks for your time.</p>