0

I am trying to run a python script using selenium in headless mode.

However, I get this error:

"selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process"

The same code works well on a normal linux version (not a server one)

  • Welcome to Stack Overflow. Please provide a [MCVE](https://stackoverflow.com/help/minimal-reproducible-example) so other users may be able to help you. – cbuchart Oct 14 '19 at 10:27
  • 2
    Possible duplicate of [WebDriverException: Message: invalid argument: can't kill an exited process with GeckoDriver, Selenium and Python on RaspberryPi3](https://stackoverflow.com/questions/52534658/webdriverexception-message-invalid-argument-cant-kill-an-exited-process-with) – Basel Issmail Oct 14 '19 at 10:28
  • Check libraries dependances... you are missing something not installed or not version compatibility – Wonka Oct 14 '19 at 10:40

1 Answers1

0

I found the solution.

The problem was due to the wrong installation of firefox on my debian server.

After adding the good repository deb http://ftp.fr.debian.org/debian sid main I was able to install firefox-esr and its dependencies via a simple apt install command.

Once all was installed, the python script worked as expected !

The new problem for me is now to configure www-data user permissions in order to allow it to execute the python script which needs write and execute permissions. (Currently encountering

IOError: [Errno 13] Permission denied: 'geckodriver.log'

)

I am looking for a descent solution: allowing its execution as root without password seems too dangerous in terms of security for me..