【问题标题】:I got error while run my code in python2.7 how to fix that error? [duplicate]在 python2.7 中运行我的代码时出现错误如何修复该错误? [复制]
【发布时间】:2017-06-02 21:38:18
【问题描述】:
Traceback (most recent call last):
  File "C:\Python27\1.wedding.py", line 28, in <module>
    driver = webdriver.Firefox()
  File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 140, in __init__
    self.service.start()
  File "C:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
    os.path.basename(self.path), self.start_error_message)
WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 

【问题讨论】:

  • newsflash:“'geckodriver' 可执行文件需要在 PATH 中。”下载它并将其放在您的路径中。
  • @flyfire 我已经回滚了你的帖子。请学习如何在您的帖子中格式化代码,不要删除您之前提供的相关信息(即追溯信息)。
  • 现在一切都很好,谢谢 使用 Python 可能复制 Selenium - Geckodriver 可执行文件需要在 PATH 中 - MYG

标签: python windows python-2.7


【解决方案1】:

我的问题已解决。我刚刚从https://github.com/mozilla/geckodriver/releases安装了geckodriver.exe

【讨论】:

    猜你喜欢
    • 2019-12-30
    • 2014-09-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-23
    • 2022-11-13
    • 1970-01-01
    相关资源
    最近更新 更多