ImportError: sys.meta_path is None, Python is likely shutting down

代码如下:

from selenium import webdriver
b = webdriver.Chrome()
b.get('http://192.168.100.21:9199/scyx')
b.maximize_window()
运行报错:

Exception ignored in: >
Traceback (most recent call last):
  File "C:\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 173, in __del__
  File "C:\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 149, in stop
  File "C:\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 120, in send_remote_shutdown_command

ImportError: sys.meta_path is None, Python is likely shutting down

解决方案:

在下面增加quit()

from selenium import webdriver
b = webdriver.Chrome()
b.get('http://192.168.100.21:9199/scyx')
b.maximize_window()
b.quit()
搞定

你可能感兴趣的:(ImportError: sys.meta_path is None, Python is likely shutting down)