title: ImportError: sys.meta_path is None, Python is likely shutting down error using driver.quit() within __del__()
body: <p>I'm trying to learn selenium for automating some stuff and I get the following error</p>
  <blockquote>
  <p>Exception ignored in: &lt;function bot.<strong>del</strong> at 0x0351BF10&gt;<br />
  Traceback (most recent call last):<br />
  File &quot;main.py&quot;, line 52, in <strong>del</strong><br />
  File &quot;C:\Users\michael-blaze\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py&quot;, line 158,
  in quit<br />
  File &quot;C:\Users\michael-blaze\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\common\service.py&quot;, line 151, in stop<br />
  File &quot;C:\Users\michael-blaze\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\common\service.py&quot;, line 122, in send_remote_shutdown_command<br />
  ImportError: sys.meta_path is None, Python is likely shutting down</p>
  </blockquote>
  <p>I figured it out the line where it comes from</p>
  <pre><code>def __del__(self):
     self.driver.quit()
  </code></pre>
  <p>My <strong>init</strong> function looks something like this</p>
  <pre><code>def __init__(self):
     self.driver = webdriver.Chrome(path)
  </code></pre>
  <p>What would cause this problem ?</p>