Traceback (most recent call last):
  File "./se3.py", line 16, in <module>
    dr=webdriver.Firefox(firefox_binary=binary,executable_path=driver_path)
  File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 154, in __init__
    keep_alive=True)
  File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 151, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 240, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
    self.error_handler.check_response(response)
  File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: failed to lookup address information: Name does not resolve

一开始以为是geckodriver的问题,于是在不同的geckodriver换来换去,firefox也试过不同的版本,然而并没有解决。百度了一下也没有相关的问题。

最后还是看错误信息,failed to lookup address information: Name does not resolve,

启动geckodriver的时候1508740937900    geckodriver    INFO    Listening on 127.0.0.1:4444

想到会不会是/etc/hosts的问题,于是在/etc/hosts上添加

127.0.0.1   localhost

问题解决。

selenium 3.6.0 geckodriver的一次坑的更多相关文章

  1. 【翻译】Selenium IDE v1.0.11 支持转换格式吗?

    原文: http://blog.reallysimplethoughts.com/2011/06/10/does-selenium-ide-v1-0-11-support-changing-forma ...

  2. Selenium Firefox 官方Webdriver -- Geckodriver 下载地址

    Selenium Firefox 官方Webdriver -- Geckodriver 下载地址 https://github.com/mozilla/geckodriver/releases

  3. tensorflow 1.8, ubuntu 16.04, cuda 9.0, nvidia-390,安装踩坑指南。

    被tensorflow 1.8, ubuntu 16.04, cuda 9.0, nvidia-390折磨了5天,终于上坑,留下指南,造福后人. 1.先把依赖搞清楚: tensorflow 1.8依赖 ...

  4. Selenium WebDriver 3.0 需要注意的事项

    以下所有代码基于Java 首先,要使用WebDriver 3.0 的话 请使用JAVA 8(必要)   其次,由于W3C标准化以及各大浏览器厂商的积极跟进,自WebDriver 3.0 之后,Sele ...

  5. python中使用selenium调用Firefox缺少geckodriver解决方法

    from selenium import webdriver driver=webdriver.Firefox() 会报错 解决方法: 因为缺少geckodriver.exe,先到https://gi ...

  6. selenium win7+selenium2.0+python环境搭建

    win7+selenium2.0+python环境搭建 by:授客 QQ:1033553122 步骤1:下载python 担心最新版的支持不太好,这里我下载的是python 2.7(selenium之 ...

  7. Selenium win7+selenium2.0+python+JetBrains PyCharm环境搭建

    win7+selenium2.0+python+JetBrains PyCharm环境搭建 by:授客 QQ:1033553122 步骤1:下载python 担心最新版的支持不太好,这里我下载的是py ...

  8. selenium 之Ran 0 tests in 0.000s

    from selenium import webdriverfrom time import ctime,sleepimport unittestclass TestLogin(unittest.Te ...

  9. ubuntu下的python请求库的安装——Selenium,ChromeDriver,GeckoDriver,PhantomJS,aiohttp

    Selenium安装: pip3 install selenium ChromeDriver安装: 在这链接下载对应版本:https://chromedriver.storage.googleapis ...

随机推荐

  1. Sublime Text 2/3 安装Emmet(Zencoding)以及常见使用,一种快速编写HTML/CSS代码的方法

    原文链接http://blog.csdn.net/shirley254/article/details/52336744

  2. C# get post 的方法

    #region GET POST /// <summary> /// Get String data = GetString(URL , "PKEY=" + Pkeyl ...

  3. 牛客网多校赛第七场J--Sudoku Subrectangle

    链接:https://www.nowcoder.com/acm/contest/145/J 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言6553 ...

  4. 徐州网络赛F-Feature Trace【暴力】

    Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat moveme ...

  5. Day27-28 基础加强

    day28基础加强 今日内容 泛型 注解 Servlet3.0 动态代理 类加载器   泛型 回顾泛型类 泛型类:具有一个或多个泛型变量的类被称之为泛型类. public class A<T&g ...

  6. 很靠谱linux常用命令

    vim是打开vim编辑器,别的编辑器还有vi(功能没有vim 强大),nano,emacs等等,感觉还是vim最强大,其次是vi,别的就要差一些了. 我听我们老师说,用图形界面本身已经会被高手笑了,如 ...

  7. git-【八】多人协作

    当你从远程库克隆时候,实际上Git自动把本地的master分支和远程的master分支对应起来了,并且远程库的默认名称是origin. 要查看远程库的信息 使用 git remote 要查看远程库的详 ...

  8. [py]class的特殊方法

    类方法 解释 hasattr hasattr(class) getattr - setattr - delattr - - - __getattr__ __setattr__ __delattr__ ...

  9. c#通过webrequest请求远程http服务时出现的问题

    用WebRequest和WebClient,两种方式,请求一个由http服务发布的应用,结果出现异常. 有三种,1.System.Net.WebException: 服务器提交了协议冲突. Secti ...

  10. ASP.NET 无法生成临时类(result=1)图解

    说明: 执行当前 Web 请求期间,出现未处理的异常.请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息. 异常详细信息: System.InvalidOperationExcep ...