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. Log4Net的简单使用

    在前面的随笔中,已经异常处理过滤器中,我们已经将获取到的错误信息写到队列中去,然后又单独的线程对队列中的错误信息处理,将错误信息输出到制定的文件中,但是如果我们需要改变需求,打算将错误信息输出到数据库 ...

  2. 关于#ifndef以及#ifndef WIN32

    一般用法是这样的: 这里可以定义如下: #define XXXXX #ifdef XXXXX 这里做一些操作,这些操作只有在XXXX已经被define的情况下才会执行到.一般还可能有else,如 #e ...

  3. 为什么不要使用"using namespace XXX"

    为什么不要使用"using namespace XXX" 1.避免降低性能 2.避免Entity冲突 This is not related to performance at a ...

  4. php安装xmlwriter遇到报错及解决方法

    Q1:make的时候报' error: 'zend_class_entry' has no member named 'default_properties''错误, A:把 错误行C文件中defau ...

  5. RPN网络

    Region Proposal Network RPN的实现方式:在conv5-3的卷积feature map上用一个n*n的sliding window(论文中n=3)生成一个长度为256(ZF网络 ...

  6. Key Set---hud5363(快速幂)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5363 #include <iostream> #include <cstdlib&g ...

  7. MongoDB: 原子性和事务

    在MongoDB中, 文档级别的的写操作是原子性的, 甚至是在对某个文档的操作中修改其多个内嵌的子文档, 也是原子性的. 在一个写操作同时修改多个文档的情况, 对其中单独的某个文档而言是原子的, 但是 ...

  8. python使用tesseract-ocr完成验证码识别

    全自动区分计算机和人类的公开图灵测试(Completely Automated Public Turing test to tell Computers and Humans Apart) 简称CAP ...

  9. Myeclipse 2013 professional 破解

    破解前要先关闭Myeclipse2013 1.(1)输入usercode可以随便输入,(2)然后选择Myeclipse的版本,(3)点击systemid按钮 2.然后点击Tools菜单栏下的Rebui ...

  10. C#基础笔记(第九天)

    1.面向过程<-->面向对象面向过程:面向的是完成这件事儿的过程,强调的是完成这件事儿的动作. 面向对象:找个对象帮你做事儿.意在写出一个通用的代码,屏蔽差异. 每个人都有姓名,性别,身高 ...