Python脚本报错:selenium.common.exceptions.WebDriverException: Message: Service chromedriver.exe unexpect
来源:互联网 发布:prim算法java实现 编辑:程序博客网 时间:2024/05/09 16:34
运行脚本时发现错误如下:
Traceback (most recent call last): File "D:\jd233.py", line 6, in <module> driver = webdriver.Chrome("23333") File "D:\Python\Python36-32\lib\site-packages\selenium-3.4.3-py3.6.egg\selenium\webdriver\chrome\webdriver.py", line 62, in __init__ self.service.start() File "D:\Python\Python36-32\lib\site-packages\selenium-3.4.3-py3.6.egg\selenium\webdriver\common\service.py", line 96, in start self.assert_process_still_running() File "D:\Python\Python36-32\lib\site-packages\selenium-3.4.3-py3.6.egg\selenium\webdriver\common\service.py", line 109, in assert_process_still_running % (self.path, return_code)selenium.common.exceptions.WebDriverException: Message: Service chromedriver.exe unexpectedly exited. Status code was: 1
后来发现是这句话有问题:
driver = webdriver.Chrome("chromedriver.exe")
加载chromedriver的时候,必须指明路径,类似下面
driver = webdriver.Chrome("D:\Python\chromedriver_win32\chromedriver.exe")
或者配环境变量
chromedriver 下载地址:
http://chromedriver.storage.googleapis.com/index.html?path=2.30/
修改之后问题解决。
阅读全文
0 0
- Python脚本报错:selenium.common.exceptions.WebDriverException: Message: Service chromedriver.exe unexpect
- Python 中selenium模块报错selenium.common.exceptions.WebDriverException: Message: 'chromedriver'
- docker selenium环境运行python脚本时候,出现selenium.common.exceptions.WebdriverException:Message:None
- selenium.common.exceptions.WebDriverException: Message: Service chromium-browser unexpectedly exited
- Python爬虫——selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly e
- Python selenium.common.exceptions.WebDriverException
- selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PAT
- Selenium python 启动firefox浏览器的异常selenium.common.exceptions.WebDriverException: Message: 'geckodriver'
- Python爬虫——selenium.common.exceptions.WebDriverException: Message: Failed to set preferences: Unable
- selenium.common.exceptions.WebDriverException: Message: "Can't load the profile.
- 【已解决】:selenium.common.exceptions.WebDriverException: Message: 'geckodriver' ...
- selenium.common.exceptions.WebDriverException: Message: Missing 'type' parameter
- Fixing “selenium.common.exceptions.WebDriverException: Message: ‘Can\’t load the profile.”
- http://stackoverflow.com/questions/39998330/selenium-common-exceptions-webdriverexception-message-se
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH
- selenium.common.exceptions.webdriverexception: message: unknown error: cannot find Chrome binary
- win10+py2.7下解决selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs
- 编写性能测试工具
- Android7.0系统进入Zygote进程
- Network Request Failed
- Unsupported major.minor version 51.0(unable to load class org.apache.struts2.dispatcher.filter.Strut
- Java多线程基础
- Python脚本报错:selenium.common.exceptions.WebDriverException: Message: Service chromedriver.exe unexpect
- php小偷程序实例代码
- checkbox全选按钮的控制
- 【Struts2】Struts2学习(8) Ajax与Json
- ubuntu git server & client
- mp4 格式 解析
- 初学者如何从零学习人工智能?
- Java机器学习库ML之六关于模型迭代训练的思考
- spring MVC单设备登录