问题是我找不到与我的Chromium版本(版本56.0.2924.84)相对应的chromedriver.当我进行apt-get升级时,它会告诉我我具有最新版本的Chromium.我已经尝试通过从 Launchpad链接下载来尝试chromedriver 53至65版本.所以当我运行以下内容from selenium import webdriverdriver_path = 'usr/lib/chromium-browser/chromedriver'driver = webdriver.Chrome(driver_path)对于Chrome驱动程序> 58,我会收到此错误selenium.common.exceptions.SessionNoteCreatedException: Message: session notcreated exception: Chrome version must be >= 59.0.3071.0(Driver info: chromedriver=2.43,platform=Linux 4.9.35-v7+ armv7l)或chrome驱动程序<的此错误; 58 selenium.common.exceptions.WebDriverException: Message:Service /usr/lib/chromium-browser/chromedriver unexpectedly exited. Status code was: 127在这里提供任何帮助解决方案根据您的问题,您的 Chromium 二进制文件的版本为 56.0.2924.84 .因此,考虑到这一限制,解决方案是从 ChromeDriver Google存储 ChromeDriver v84:支持Chrome v84 ChromeDriver v83:支持Chrome v83 ChromeDriver v82:有意跳过 ChromeDriver v81:支持Chrome v81 ChromeDriver v80:支持Chrome v80 ChromeDriver v79:支持Chrome v79 ChromeDriver v78:支持Chrome v78 ChromeDriver v77:支持Chrome v77 ChromeDriver v76:支持Chrome v76 ChromeDriver v75:支持Chrome v75 ChromeDriver v74:支持Chrome v74 ChromeDriver v73:支持Chrome v73 ChromeDriver v2.46:支持Chrome v71-73 ChromeDriver v2.46:支持Chrome v71-73 ChromeDriver v2.45:支持Chrome v70-72 ChromeDriver v2.44:支持Chrome v69-71(与ChromeDriver 2.43相同,但具有其他错误修复) ChromeDriver v2.43:支持Chrome v69-71 ChromeDriver v2.42:支持Chrome v68-70 ChromeDriver v2.41:支持Chrome v67-69 ChromeDriver v2.40:支持Chrome v66-68 ChromeDriver v2.39:支持Chrome v66-68 ChromeDriver v2.38:支持Chrome v65-67 ChromeDriver v2.37:支持Chrome v64-66 ChromeDriver v2.36:支持Chrome v63-65 ChromeDriver v2.35:支持Chrome v62-64 ChromeDriver v2.34:支持Chrome v61-63 ChromeDriver v2.33:支持Chrome v60-62 ChromeDriver v2.32:支持Chrome v59-61 ChromeDriver v2.31:支持Chrome v58-60 ChromeDriver v2.30:支持Chrome v58-60 ChromeDriver v2.29:支持Chrome v56-58 ChromeDriver v2.28:支持Chrome v55-57 ChromeDriver v2.27:支持Chrome v54-56 注意:几个月前, Chromium Team 制作了初步公告,ChromeDriver的版本控制模型将更改. 铬团队正在推进该计划.具体来说,ChromeDriver 2.46将是包含2的主要版本的最新版本.将来的ChromeDriver发行版将具有与Chrome发行版相似的版本号.我们将从下周的ChromeDriver 73版本开始,而不是Beta版本的Chrome73.以下是新发行模型的工作方式: ChromeDriver将使用与Chrome相同的版本号方案.有关更多信息,请参见 https://www.chromium.org/developers/version-numbers 详细信息.每个版本的ChromeDriver将支持具有匹配的主要版本,次要版本和内部版本号的Chrome.例如,即将推出的ChromeDriver 73.0.3683.*将支持所有以73.0.3683开头的Chrome版本.在新的主要版本的Chrome浏览器进入Beta之前,将发布匹配版本的ChromeDriver.例如,下周将发布新版本的ChromeDriver,以匹配Chrome m73的Beta版.在首次发布新的主要版本之后,我们将根据需要发布补丁.这些修补程序可能与更新Chrome一致,也可能不一致.用于Raspberry Pi的ChromeDriver在使用 Raspberry Pi 时,您需要从此ChromeDriver 的 arm 格式. github.com/electron/electron/releases/download/v1.6.0/chromedriver-v2.21-linux-armv7l.zip"rel =" nofollow noreferrer>链接,并在程序中使用它.其他注意事项将硒升级到当前级别> 版本3.11.0 > .按照上面的讨论升级 ChromeDriver .保持 Chrome 版本处于 Chrome v56.x 级别. (根据讨论)通过 IDE 清理您的项目工作区和重建您的项目,并且仅具有必需的依赖项.使用 CCleaner 工具清除之前和之后的所有操作系统杂项在执行 test Suite 之后.如果您的基本 Web客户端版本太旧,请通过来卸载. Revo Uninstaller 并安装最新版本的 Web客户端 GA和发行版.进行系统重启.执行您的@Test.I have written a python script that does some tasks in the browser (using Selenium), which works fine in Windows. Now I am trying to now get it onto my Raspberry Pi.I did a lot of searching to find the best way to get this to work with Chromium. The best I could find was at this Reddit Link.The problem is that I cannot find a chromedriver that jives with my version of Chromium (version 56.0.2924.84). And when I do apt-get upgrade it advises me that I have the newest version of Chromium. I've tried chromedriver versions 53 through 65 by downloading from this Launchpad Link.So when I run the followingfrom selenium import webdriverdriver_path = 'usr/lib/chromium-browser/chromedriver'driver = webdriver.Chrome(driver_path)I get this error for chrome drivers > 58selenium.common.exceptions.SessionNoteCreatedException: Message: session notcreated exception: Chrome version must be >= 59.0.3071.0(Driver info: chromedriver=2.43,platform=Linux 4.9.35-v7+ armv7l)or this error for chrome drivers < 58selenium.common.exceptions.WebDriverException: Message:Service /usr/lib/chromium-browser/chromedriver unexpectedly exited. Status code was: 127any help here would be appreciated 解决方案 As per your question your Chromium binary is of version 56.0.2924.84. So keeping this constraint in consideration the solution would be to download either of the following ChromeDriver version from ChromeDriver Google StorageChromeDriver v84: Supports Chrome v84ChromeDriver v83: Supports Chrome v83ChromeDriver v82: Was intentionally skippedChromeDriver v81: Supports Chrome v81ChromeDriver v80: Supports Chrome v80ChromeDriver v79: Supports Chrome v79ChromeDriver v78: Supports Chrome v78ChromeDriver v77: Supports Chrome v77ChromeDriver v76: Supports Chrome v76ChromeDriver v75: Supports Chrome v75ChromeDriver v74: Supports Chrome v74ChromeDriver v73: Supports Chrome v73ChromeDriver v2.46: Supports Chrome v71-73ChromeDriver v2.46: Supports Chrome v71-73ChromeDriver v2.45: Supports Chrome v70-72ChromeDriver v2.44: Supports Chrome v69-71 (same as ChromeDriver 2.43, but with additional bug fixes)ChromeDriver v2.43: Supports Chrome v69-71ChromeDriver v2.42: Supports Chrome v68-70ChromeDriver v2.41: Supports Chrome v67-69ChromeDriver v2.40: Supports Chrome v66-68ChromeDriver v2.39: Supports Chrome v66-68ChromeDriver v2.38: Supports Chrome v65-67ChromeDriver v2.37: Supports Chrome v64-66ChromeDriver v2.36: Supports Chrome v63-65ChromeDriver v2.35: Supports Chrome v62-64ChromeDriver v2.34: Supports Chrome v61-63ChromeDriver v2.33: Supports Chrome v60-62ChromeDriver v2.32: Supports Chrome v59-61ChromeDriver v2.31: Supports Chrome v58-60ChromeDriver v2.30: Supports Chrome v58-60ChromeDriver v2.29: Supports Chrome v56-58ChromeDriver v2.28: Supports Chrome v55-57ChromeDriver v2.27: Supports Chrome v54-56 Note: A few months ago, Chromium Team made a preliminary announcement that ChromeDriver's versioning model will be changing. Chromium Team is moving forward with the plan. Specifically, ChromeDriver 2.46 will be the last release carrying the major version of 2. Future ChromeDriver releases will carry a version number similar to Chrome release. We will start with a release of ChromeDriver 73 next week, before the Beta release of Chrome 73.Here is how the new release model will work:ChromeDriver will be using the same version number scheme as Chrome. See https://www.chromium.org/developers/version-numbers for more details.Each version of ChromeDriver will support Chrome with matching major, minor, and build version numbers. For example, upcoming ChromeDriver 73.0.3683.* will support all Chrome versions that start with 73.0.3683.Before a new major version of Chrome goes to Beta, a matching version of ChromeDriver will be released. For example, a new version of ChromeDriver will be release next week to match the Beta release of Chrome m73.After the initial release of a new major version, we will release patches as needed. These patches may or may not coincide with updates to Chrome.ChromeDriver for Raspberry PiAs you are using Raspberry Pi you need to download the arm format of ChromeDriver from this link and use it within your program.Additional ConsiderationsUpgrade Selenium to current levels Version 3.11.0.Upgrade ChromeDriver as per the above discussion.Keep Chrome version at Chrome v56.x levels. (as per the discussion)Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.Take a System Reboot.Execute your @Test. 这篇关于WebDriverException:消息:在带有ChromeDriver和Selenium的Raspberry-Pi上,服务/usr/lib/chromium-browser/chromedriver意外退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-06 21:33