If I launch a Python shell inside Emacs with run-python and try to open a Chromium window with Selenium, I am suddenly running in to the following error:

Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded
>>> from selenium import webdriver
>>> browser = webdriver.Chrome()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/brian/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
  File "/home/brian/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 98, in start
  File "/home/brian/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 109, in assert_process_still_running
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1


If I do the same thing but outside of Emacs, I do not have this problem. In either case, the output of print(webdriver.__file__) is the same, /home/brian/.local/lib/python3.8/site-packages/selenium/webdriver/__init__.py Version heading is also the same outside of Emacs.

So what might be different about the Python environment in emacs that I suddenly can't do this anymore? (It was working fine before my last system update.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.