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