selenium.common.exceptions.WebDriverException:消息:服务意外退出。状态码为:3221225595

selenium.common.exceptions.WebDriverException: Message: Service unexpectedly exited. Status code was: 3221225595

我无法在 selenium 中使用 geckodriver。它向我展示了这个错误:

Traceback (most recent call last):
  File "c:/E/INSURANCE/Data.py", line 13, in <module>

    browser = webdriver.Firefox(executable_path=r'C:\Users\intel\Downloads\geckodriver.exe')

  File "C:\Users\intel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 164, in __init__
    self.service.start()
  File "C:\Users\intel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\common\service.py", line 98, in start
    self.assert_process_still_running()

  File "C:\Users\intel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\common\service.py", line 109, in assert_process_still_running

raise WebDriverException(
    selenium.common.exceptions.WebDriverException: Message: Service C:\Users\intel\Downloads\geckodriver unexpectedly exited. Status code was: 3221225595

任何帮助将不胜感激...

尝试安装 Microsoft Visual Studio 可再发行运行时,它可能会解决您的问题。

来源:Geckodriver issue from bugtracker.