WebDriverException: Message: invalid argument: can't kill an exited process error with Selenium GeckoDriver and Firefox in Google Colab on Ubuntu

好久不见. 提交于 2019-12-02 08:35:03

After all the discussion within the comments it seems you erred the command to download GeckoDriver and possibly some issues with downloading and/or installing Firefox.


GeckoDriver

The command to install within was error prone:

!apt install firefox-geckodriver

Here are the detailed steps:

  • Browse to the geckodriver releases page. Checkout the compatible version of GeckoDriver for your platform and download it as follows:

    wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
    
  • Extract the file with:

    tar -xvzf geckodriver*
    
  • Make it executable:

    chmod +x geckodriver
    
  • Add the driver to your PATH so other tools can find it:

    export PATH=$PATH:/path-to-extracted-file/.
    

Reference: How to install geckodriver in Ubuntu?


Firefox

The latest version of Firefox is always available as a security updates in all supported releases of Ubuntu and a normal update will install it. You need to enable the security or you need to update the repositories (e. g. Software & Updates -> Updates). You need to enable the Security by default but better to check if the package manager doesn't updates Firefox by default.

You can find the detailed steps in:

Reference: How do I install the latest stable version of Firefox?


Update

Selenium Client Driver page mentions:

So possibly Python 3.7 is still not supported and you may have to downgrade to a relevant version.


Outro

SessionNotCreatedException: Message: Unable to create new service: ChromeDriverService with Selenium 3.14.0 and Python 3.7.3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!