Home  >  Article  >  Backend Development  >  Here are a few question-based titles that fit the provided information: Short & Punchy: * Why Am I Getting \"Invalid Argument: Can\'t Kill an Exited Process\" with Selenium on my Raspb

Here are a few question-based titles that fit the provided information: Short & Punchy: * Why Am I Getting \"Invalid Argument: Can\'t Kill an Exited Process\" with Selenium on my Raspb

DDD
DDDOriginal
2024-10-28 06:38:30778browse

Here are a few question-based titles that fit the provided information:

Short & Punchy:

* Why Am I Getting

WebDriverException: Invalid Argument: Can't Kill an Exited Process with GeckoDriver, Selenium, and Python on RaspberryPi3

Question:

Users are encountering a WebDriverException error while attempting to run Selenium with headless Firefox on a Raspberry Pi 3. The specific error message is: "Message: invalid argument: can't kill an exited process."

Background Information:

  • Server: Raspberry Pi 3
  • OS: Dietpi version 159
  • Geckodriver version: 0.22 for arm
  • Firefox version: 52.9.0
  • Python version: 3.5
  • Selenium version: 3.14.1

Code Snippet:

<code class="python">from selenium import webdriver
from selenium.webdriver.firefox.options import Options

options = Options()
options.headless = True
driver = webdriver.Firefox(options=options)</code>

Answer:

To resolve this issue, ensure that you are using headless mode when running Firefox on a system without a display.

Solution:

  1. Add the following code to your script:
<code class="python">options.headless = True</code>
  1. Verify that you have compatible versions of Firefox, Selenium, and Geckodriver. Refer to the following documentation for support: https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html

The above is the detailed content of Here are a few question-based titles that fit the provided information: Short & Punchy: * Why Am I Getting \"Invalid Argument: Can\'t Kill an Exited Process\" with Selenium on my Raspb. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn