简体   繁体   English

selenium.common.exceptions.WebDriverException:消息:服务geckodriver意外退出。 状态代码为:-11-如何解决?

[英]selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: -11 - How to fix?

I want to setup https://github.com/mukulhase/WebWhatsapp-Wrapper on my Raspberry Pi Zero W. I used this ( https://www.raspberrypi.org/forums/viewtopic.php?t=167292#p1246095 ) as "tutorial" for installing Gecko Driver. 我想在我的Raspberry Pi Zero W上设置https://github.com/mukulhase/WebWhatsapp-Wrapper 。我使用了它( https://www.raspberrypi.org/forums/viewtopic.php?t=167292#p1246095 )作为安装Gecko驱动程序的“教程”。 Instead of 代替

curl -O {link}

I used 我用了

wget {link}

because 因为

tar -xzvf {file} 

didn't work for me. 没有为我工作。

At the moment when I wanted to open Firefox (you can see below in my code) it fails. 当我想打开Firefox时(您可以在下面的代码中看到),它失败了。 I hope anybody could help me. 我希望有人能帮助我。

I tried to use another version of geckodriver but it didn't work, too. 我尝试使用其他版本的geckodriver,但也无法正常工作。

>>> from selenium import webdriver
>>> browser = webdriver.Firefox()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
self.service.start()
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
    % (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: -11

有人发现RasPi Zero使用arm6hf,但我将geckodriver用于arm7hf。

This error message... 此错误消息...

selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: -11

...implies that the subprocess exited and Status code was: -11 ...表示该子进程 exited并且状态代码为:-11

You need to download the latest matching geckodriver from Releases · mozilla/geckodriver . 您需要从下载最新的匹配geckodriver 发布的mozilla·/ geckodriver

As you are on Raspberry Pi Zero W you need to download geckodriver-v0.23.0-arm7hf.tar.gz and save it within your system. 在使用Raspberry Pi Zero W时,您需要下载geckodriver-v0.23.0-arm7hf.tar.gz并将其保存在系统中。 Additionally, you need to mention the absolute path of the geckodriver binary passing the argument executable_path as follows: 此外,您需要提及geckodriver二进制executable_path绝对路径 ,并通过以下参数传递了execute_path 参数

from selenium import webdriver

driver = webdriver.Firefox(executable_path='/path/to/geckodriver')
driver.get("http://google.com/")
driver.quit()

References 参考

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 webDriverException“selenium.common.exceptions.WebDriverException:消息:Service./webdrivers/geckodriver 意外退出。状态代码为:1” - webDriverException "selenium.common.exceptions.WebDriverException: Message: Service ./webdrivers/geckodriver unexpectedly exited. Status code was: 1" selenium.common.exceptions.WebDriverException:消息:Service.\geckodriver.exe 意外退出。 状态码为:3221225595 - selenium.common.exceptions.WebDriverException: Message: Service .\geckodriver.exe unexpectedly exited. Status code was: 3221225595 selenium.common.exceptions.WebDriverException:消息:服务geckodriver意外退出。 状态码为:69 - selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 69 Docker Selenium:selenium.common.exceptions.WebDriverException:消息:服务chromedriver意外退出。 状态码为:127 - Docker Selenium: selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 selenium.common.exceptions.WebDriverException:消息:服务意外退出。 状态码为:3221225595 - selenium.common.exceptions.WebDriverException: Message: Service unexpectedly exited. Status code was: 3221225595 selenium.common.exceptions.WebDriverException:消息:服务 chromedriver 意外退出。 状态码是:1 - selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1 selenium.common.exceptions.WebDriverException:消息:chromedriver 意外退出。 状态码为:255 使用 Dockerfile 时 - selenium.common.exceptions.WebDriverException: Message: chromedriver unexpectedly exited. Status code was: 255 When using Dockerfile selenium.common.exceptions.WebDriverException:消息:服务 chromedriver 意外退出 - selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited WebDriverException:消息:服务 geckodriver 意外退出。 状态代码是:64 error using Selenium Geckodriver Firefox in FreeBSD jail - WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 64 error using Selenium Geckodriver Firefox in FreeBSD jail WebDriverException:消息:服务 chromedriver 意外退出。 状态代码为:127 - WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM