Reputation: 829
I want to run InstaPy on windows based on this instructions so I installed it until step 3 and I'm in the advanced setup. because simple set up did'nt work for me. now i have installed GUI tool from an .exe setup file and running the bot will open a chrome page like this and after a while I get attached error bellow. what should I I do? where did I go wrong?
Im google chrome Version 68.0.3440.75 (Official Build) (64-bit) and currently I use chromedriver.exe version 2.4 and python 3.6.5
and after that I see this error in GUI
the error is this
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
UPDATE: I downloaded the 2.40 and placed it in assets folder but its 2.4.226107 in the error message chromedriver=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
Upvotes: 1
Views: 999
Reputation: 193298
This error message...
Message: unknown error: unable to discover open pages
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowsing session through Chrome Browser.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Supports Chrome v66-68
So there is a clear mismatch between the ChromeDriver v2.4 and the Chrome Browser v68.0
As you mentioned, even after upgrading to chromedriver=2.40 you still se the ChromeDriver version as chromedriver=2.4, you can override the previous version within OS PATH by explicitly mentioning the argument executable_path
as follows:
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe')
Upvotes: 1