Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Selenium ChromeDriver错误消息:EGL\u未初始化_Python_Selenium_Web Scraping_Selenium Chromedriver - Fatal编程技术网

Python Selenium ChromeDriver错误消息:EGL\u未初始化

Python Selenium ChromeDriver错误消息:EGL\u未初始化,python,selenium,web-scraping,selenium-chromedriver,Python,Selenium,Web Scraping,Selenium Chromedriver,我在Windows7和Python 3.6上运行ChromeDriver 2.34.522940和Selenium 3.8.0 我正在尝试以下代码: def foo(url, login, password): from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome() driver.get(url) 它给出

我在Windows7和Python 3.6上运行ChromeDriver 2.34.522940和Selenium 3.8.0

我正在尝试以下代码:

def foo(url, login, password):
    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys

    driver = webdriver.Chrome()
    driver.get(url)
它给出了错误信息:

开发工具监听 ws://127.0.0.1:12355/devtools/browser/ed317bfa-b264-4fd7-bc5d-aeab717fdb58

[1229/152519.688:错误:gl_surface_egl.cc(772)]eglinitalize D3D11 失败,错误为EGL\u未初始化,正在尝试下一种显示类型

继续运行以下代码:

    u = driver.find_element_by_name('login')
    u.send_keys(login)
    p = driver.find_element_by_name('password')
    p.send_keys(password)
    p.send_keys(Keys.RETURN)
它给出了一个新的错误消息:

[9152:11284:1229/152703.260:错误:service_manager.cc(157)]连接 InterfaceProviderSpec阻止服务:内容\u呈现程序绑定 界面:blink::mojom::ReportingServiceProxy暴露于: 内容浏览器

几秒钟后:

[9152:11284:1229/152720.000:错误:过程_metrics.cc(105)]未执行 已实施[9152:11284:1229/152720.000:错误:过程_metrics.cc(105)] 未实施 [9152:11284:1229/152720.000:错误:过程_metrics.cc(105)]未执行 已实施[9152:11284:1229/152720.000:错误:过程_metrics.cc(105)] 未实施


我昨天运行了相同的代码,但它没有给出这些错误消息。是什么导致了这些错误,以及如何抑制这些错误消息?

通过更新到ChromeDriver 2.35的最新版本,问题得到了解决