小编Kir*_* Jr的帖子

硒铬驱动程序httplib.badstatusline

我使用以下教程安装selenium,chr​​ome,pyvritualdisplay和xvfb:https://christopher.su/2015/selenium-chromedriver-ubuntu/

当我尝试运行python selenium脚本时,我在调用webdriver.Chrome()时出现此错误

我在Ubuntu 14.04.3 LTS上使用python2.7.6

Traceback (most recent call last):
 File "selenium_python_unittests/attempt_50.py", line 9, in <module>
driver = webdriver.Chrome()
  File "/home/sele/headless/local/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
desired_capabilities=desired_capabilities)
  File "/home/sele/headless/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 92, in __init__
self.start_session(desired_capabilities, browser_profile)
  File "/home/sele/headless/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 179, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
  File "/home/sele/headless/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute
response = self.command_executor.execute(driver_command, params)
  File "/home/sele/headless/local/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 407, in execute
return self._request(command_info[0], url, body=data)
  File "/home/sele/headless/local/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 439, in _request
resp = self._conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1051, …
Run Code Online (Sandbox Code Playgroud)

selenium httplib python-2.7 xvfb selenium-chromedriver

6
推荐指数
1
解决办法
3236
查看次数