错误:gl_surface_egl.cc(750)] EGL驱动程序消息(严重)egl初始化:没有可用的渲染器错误使用ChromeDriver和Chrome with Selenium

lztngnrs  于 2023-06-19  发布在  Go
关注(0)|答案(1)|浏览(371)

我试图执行基本的Python谷歌Chrome自动化 selenium 命令我得到下面的错误,而执行下面的代码:

from selenium import webdriver
chrome_path=r"xxxx\chromedriver_win32_2\chromedriver.exe"
driver= webdriver.Chrome(chrome_path)
driver.get("<somesite>")

注意:我有windows7 64位操作系统,Chrome驱动程序版本是最新的,chome浏览器也是最新的。
错误:

DevTools listening on ws://127.0.0.1:12592/devtools/browser/78ac717d-857a-436c-9b28-ee18bc18fa66
[0615/004254.120:ERROR:gl_surface_egl.cc(750)] EGL Driver message (Critical) eglInitialize: No available renderers.
[0615/004254.127:ERROR:gl_surface_egl.cc(1236)] eglInitialize D3D11 failed with error EGL_NOT_INITIALIZED, trying next display type
[0615/004255.175:ERROR:gl_surface_egl.cc(750)] EGL Driver message (Critical) eglInitialize: No available renderers.
[0615/004255.176:ERROR:gl_surface_egl.cc(1236)] eglInitialize D3D9 failed with error EGL_NOT_INITIALIZED
[0615/004255.178:ERROR:gl_initializer_win.cc(196)] GLSurfaceEGL::InitializeOneOff failed.
[0615/004255.184:ERROR:viz_main_impl.cc(152)] Exiting GPU process due to errors during initialization
Code executing....
[0615/005841.064:ERROR:batching_media_log.cc(38)] MediaEvent: {"error":"MediaSource endOfStream before demuxer initialization completes (before HAVE_METADATA) is treated as an error. This may also occur as consequence of other MediaSource errors before HAVE_METADATA."}
[0615/005942.374:ERROR:batching_media_log.cc(38)] MediaEvent: {"
edqdpe6u

edqdpe6u1#

此错误消息...

[0615/004254.120:ERROR:gl_surface_egl.cc(750)] EGL Driver message (Critical) eglInitialize: No available renderers

...意味着 ChromeDriver 无法启动/产生新的 Browsing Context,即 *Chrome浏览器 * 会话。
通常观察到此错误是由于selenium-chromedrivergoogle-chrome版本之间的不匹配。

解决方案

您需要升级ChromeDriver和 Google Chrome 版本到最新版本或兼容版本之一,详细说明在讨论Protractor-selenium错误消息:“gl_surface_egl.cc eglInitialize D3 D9失败,错误为EGL_NOT_INITIALIZED”

外推

您可以在以下网站找到相关讨论:

相关问题