Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python selenium.common.exceptions.WebDriverException:消息:未知错误:通过InstaPy和selenium执行测试时无法发现打开的页面_Python_Google Chrome_Selenium_Selenium Webdriver_Selenium Chromedriver - Fatal编程技术网

Python selenium.common.exceptions.WebDriverException:消息:未知错误:通过InstaPy和selenium执行测试时无法发现打开的页面

Python selenium.common.exceptions.WebDriverException:消息:未知错误:通过InstaPy和selenium执行测试时无法发现打开的页面,python,google-chrome,selenium,selenium-webdriver,selenium-chromedriver,Python,Google Chrome,Selenium,Selenium Webdriver,Selenium Chromedriver,我想在基于的windows上运行InstaPy 因此,我一直安装到第3步,现在处于高级设置中。因为简单的设置对我不起作用。 现在我已经从安装了GUI工具,运行这个机器人会像这样打开一个chrome页面,过了一会儿我会收到下面的错误提示。我该怎么办?我哪里出错了 Im谷歌chrome版本68.0.3440.75(官方版本)(64位),目前我使用chromedriver.exe版本2.4和python 3.6.5 首先我看到这个chrome页面: 然后我在GUI中看到这个错误 错误是这样的 Err

我想在基于的windows上运行InstaPy 因此,我一直安装到第3步,现在处于高级设置中。因为简单的设置对我不起作用。 现在我已经从安装了GUI工具,运行这个机器人会像这样打开一个chrome页面,过了一会儿我会收到下面的错误提示。我该怎么办?我哪里出错了

Im谷歌chrome版本68.0.3440.75(官方版本)(64位),目前我使用chromedriver.exe版本2.4和python 3.6.5

首先我看到这个chrome页面:

然后我在GUI中看到这个错误 错误是这样的

Error: ERROR [2018-07-26 11:16:27] [mohammad.f.rasoulnejad] Message: unknown error: unable to discover open pages
 (Driver info: chromedriver=2.4.226107,platform=Windows NT 6.3 x86_64)
 Traceback (most recent call last):
 File "C:\Users\Mohammad\Desktop\InstaPy\instapy\instapy.py", line 295, in set_selenium_local_session
 chrome_options=chrome_options)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
 desired_capabilities=desired_capabilities)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 90, in __init__
 self.start_session(desired_capabilities, browser_profile)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 177, in start_session
 response = self.execute(Command.NEW_SESSION, capabilities)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
 self.error_handler.check_response(response)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
 raise exception_class(message, screen, stacktrace)
 selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages
 (Driver info: chromedriver=2.4.226107,platform=Windows NT 6.3 x86_64)

 Traceback (most recent call last):
 File "C:\Users\Mohammad\Desktop\InstaPy\instapy\instapy.py", line 295, in set_selenium_local_session
 chrome_options=chrome_options)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
 desired_capabilities=desired_capabilities)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 90, in __init__
 self.start_session(desired_capabilities, browser_profile)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 177, in start_session
 response = self.execute(Command.NEW_SESSION, capabilities)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
 self.error_handler.check_response(response)
 File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
 raise exception_class(message, screen, stacktrace)
 selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages
 (Driver info: chromedriver=2.4.226107,platform=Windows NT 6.3 x86_64)


 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
 File "quickstart.py", line 3, in <module>
 session = InstaPy(username='mohammad.f.rasoulnejad', password='myPassword')
 File "C:\Users\Mohammad\Desktop\InstaPy\instapy\instapy.py", line 188, in __init__
 self.set_selenium_local_session()
 File "C:\Users\Mohammad\Desktop\InstaPy\instapy\instapy.py", line 299, in set_selenium_local_session
 Settings.chromedriver_location))
 instapy.instapy.InstaPyError: ensure chromedriver is installed at C:\Users\Mohammad\Desktop\InstaPy\assets\chromedriver
InstaPy ended
错误:错误[2018-07-26 11:16:27][mohammad.f.rasoulnejad]消息:未知错误:无法发现打开的页面
(驱动程序信息:chromedriver=2.4.226107,平台=Windows NT 6.3 x86_64)
回溯(最近一次呼叫最后一次):
文件“C:\Users\Mohammad\Desktop\InstaPy\InstaPy\InstaPy.py”,第295行,在set\u selenium\u local\u会话中
chrome\u选项=chrome\u选项)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\chrome\webdriver.py”,第69行,在\uuu init中__
期望的_能力=期望的_能力)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第90行,在\uuu init中__
self.start\u会话(所需的\u功能、浏览器\u配置文件)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第177行,在启动会话中
响应=self.execute(Command.NEW_会话,功能)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第236行,在execute中
self.error\u handler.check\u响应(响应)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\errorhandler.py”,第192行,在check\u响应中
引发异常类(消息、屏幕、堆栈跟踪)
selenium.common.exceptions.WebDriverException:消息:未知错误:无法发现打开的页面
(驱动程序信息:chromedriver=2.4.226107,平台=Windows NT 6.3 x86_64)
回溯(最近一次呼叫最后一次):
文件“C:\Users\Mohammad\Desktop\InstaPy\InstaPy\InstaPy.py”,第295行,在set\u selenium\u local\u会话中
chrome\u选项=chrome\u选项)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\chrome\webdriver.py”,第69行,在\uuu init中__
期望的_能力=期望的_能力)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第90行,在\uuu init中__
self.start\u会话(所需的\u功能、浏览器\u配置文件)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第177行,在启动会话中
响应=self.execute(Command.NEW_会话,功能)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第236行,在execute中
self.error\u handler.check\u响应(响应)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\errorhandler.py”,第192行,在check\u响应中
引发异常类(消息、屏幕、堆栈跟踪)
selenium.common.exceptions.WebDriverException:消息:未知错误:无法发现打开的页面
(驱动程序信息:chromedriver=2.4.226107,平台=Windows NT 6.3 x86_64)
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“quickstart.py”,第3行,在
session=InstaPy(用户名='mohammad.f.rasoulnejad',密码='myPassword')
文件“C:\Users\Mohammad\Desktop\InstaPy\InstaPy\InstaPy.py”,第188行,在\uuu init中__
self.set\u selenium\u local\u session()
文件“C:\Users\Mohammad\Desktop\InstaPy\InstaPy\InstaPy.py”,第299行,在set\u selenium\u local\u会话中
设置。chromedriver_位置)
instapy.instapy.InstaPyError:确保chromedriver安装在C:\Users\Mohammad\Desktop\instapy\assets\chromedriver
InstaPy结束
更新: 我下载了2.40并将其放在assets文件夹中,但其2.4.226107出现在错误消息中 色度驱动器=2.4.226107

DevTools listening on ws://127.0.0.1:12969/devtools/browser/c5a3dd55-34fb-4723-9161-6b8a6e469b29
ERROR [2018-07-26 12:58:34] [mohammad.f.rasoulnejad]  Message: unknown error: unable to discover open pages
  (Driver info: chromedriver=2.4.226107,platform=Windows NT 6.3 x86_64)
Traceback (most recent call last):
  File "C:\Users\Mohammad\Desktop\InstaPy\instapy\instapy.py", line 295, in set_selenium_local_session
    chrome_options=chrome_options)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 90, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 177, in start_session
    response = self.execute(Command.NEW_SESSION, capabilities)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages
  (Driver info: chromedriver=2.4.226107,platform=Windows NT 6.3 x86_64)

Traceback (most recent call last):
  File "C:\Users\Mohammad\Desktop\InstaPy\instapy\instapy.py", line 295, in set_selenium_local_session
    chrome_options=chrome_options)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 90, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 177, in start_session
    response = self.execute(Command.NEW_SESSION, capabilities)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "D:\web\Python 3.6.5\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages
  (Driver info: chromedriver=2.4.226107,platform=Windows NT 6.3 x86_64)


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "quickstart.py", line 3, in <module>
    session = InstaPy(username='mohammad.f.rasoulnejad', password='myPassword')
  File "C:\Users\Mohammad\Desktop\InstaPy\instapy\instapy.py", line 188, in __init__
    self.set_selenium_local_session()
  File "C:\Users\Mohammad\Desktop\InstaPy\instapy\instapy.py", line 299, in set_selenium_local_session
    Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at C:\Users\Mohammad\Desktop\InstaPy\assets\chromedriver
DevTools在ws://127.0.0.1:12969/DevTools/browser/c5a3dd55-34fb-4723-9161-6b8a6e469b29上侦听
错误[2018-07-26 12:58:34][mohammad.f.rasoulnejad]消息:未知错误:无法发现打开的页面
(驱动程序信息:chromedriver=2.4.226107,平台=Windows NT 6.3 x86_64)
回溯(最近一次呼叫最后一次):
文件“C:\Users\Mohammad\Desktop\InstaPy\InstaPy\InstaPy.py”,第295行,在set\u selenium\u local\u会话中
chrome\u选项=chrome\u选项)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\chrome\webdriver.py”,第69行,在\uuu init中__
期望的_能力=期望的_能力)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第90行,在\uuu init中__
self.start\u会话(所需的\u功能、浏览器\u配置文件)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第177行,在启动会话中
响应=self.execute(Command.NEW_会话,功能)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第236行,在execute中
self.error\u handler.check\u响应(响应)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\errorhandler.py”,第192行,在check\u响应中
引发异常类(消息、屏幕、堆栈跟踪)
selenium.common.exceptions.WebDriverException:消息:未知错误:无法发现打开的页面
(驱动程序信息:chromedriver=2.4.226107,平台=Windows NT 6.3 x86_64)
回溯(最近一次呼叫最后一次):
文件“C:\Users\Mohammad\Desktop\InstaPy\InstaPy\InstaPy.py”,第295行,在set\u selenium\u local\u会话中
chrome\u选项=chrome\u选项)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\chrome\webdriver.py”,第69行,在\uuu init中__
期望的_能力=期望的_能力)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\webdriver\remote\webdriver.py”,第90行,在\uuu init中__
self.start\u会话(所需的\u功能、浏览器\u配置文件)
文件“D:\web\Python 3.6.5\lib\site packages\selenium\w
Message: unknown error: unable to discover open pages
from selenium import webdriver

driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe')