title: ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} while trying to run an image down loader on Python using Selenium
body: <p>the code runs fine until it tries to access the directory.
  any input is appreciated thanks</p>
  <p>Here is the code:</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.chrome.options import Options
  import os
  import ast
  import requests
  import urllib.request
  from bs4 import BeautifulSoup as Soup
  
  
  opts = Options()
  
  opts.add_argument(&quot;user-agent=chrome/23.0.1271&quot;)
  
  driver = webdriver.Chrome(&quot;./chromedriver.exe&quot;)
  
  url = 'https://s.aolcdn.com/os/ab/_cms/2020/09/09081722/568224.jpg'
  directory = 'RAW'
  FILETYPE = '.jpg'
  
  r = requests.get(url,allow_redirects=True)
  
  
  
  def find_urls(url):
      driver.get(url)
      wait = input('loading...lmao')
      page = driver.page_source
  
      soup = Soup(page,'lxml')
      images = soup.find_all('img',{&quot;src&quot;:True})
  
  all_images = []
  
  for image in images:
      image_src = image['src']
      print(image_src)
      
      urllib.request.urlretrieve(image_src)
  
  
  Images = find_urls(url)
  
  
  
  
  
  def save_img(Image,directory):
      if not os.path.isdir(directory):
          os.mkdir(directory)
  
              
  for i,link in enumerate(url):
      path = os.path.join(directory,'(:06).jpg'.format(i))
      try:
          ulib.urlretrieve(link,path)
      except:
          print('Failed:')
  
              
  save_img(Images,directory)
  </code></pre>
  <p>I think might be how I access the directory but I'm running out of things to try I've checked the folder made sure to run as admin.</p>