@uluQulu I get this error after latest update.
Workspace in use: "/home/xx/InstaPy"
2829kb [00:00, 3763.40kb/s]
Traceback (most recent call last):
File "xx.py", line 57, in
multi_logs=True
File "/home/xx/InstaPy/instapy/instapy.py", line 318, in __init__
self.logger,
File "/home/xx/InstaPy/instapy/browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
keep_alive=True)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
write a full log and more info. Anyway update firefox and read https://firefox-source-docs.mozilla.org/testing/geckodriver/Usage.html#selenium the error "Unable to find a matching set of capabilities" is generated usually when the the option settings are wrong.
same issue
plss help...
Traceback (most recent call last):
File "C:/Users/User/PycharmProjects/insta/shop/followed_list_generator.py", line 13, in
session = InstaPy(username,password)
File "C:\Users\User\PycharmProjectsinsta\venv\lib\site-packagesinstapyinstapy.py", line 318, in __init__
self.logger,
File "C:\Users\User\PycharmProjectsinsta\venv\lib\site-packagesinstapy\browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "C:\Users\User\PycharmProjectsinsta\venv\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in __init__
keep_alive=True)
File "C:\Users\User\PycharmProjectsinsta\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\User\PycharmProjectsinsta\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\User\PycharmProjectsinsta\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\User\PycharmProjectsinsta\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
write more info like version firefox etc... and your instapy settings params, before use instapy try to start one easy connection to firefox...like
from selenium import webdriver
driver = webdriver.Firefox() driver.get('http://google.com')
print driver.title
driver.quit()
@gerfra @uluQulu that error stopped when installed and updated firefox. But got new one:
Traceback (most recent call last):
File "/home/fredrik/InstaPy/instapy/login_util.py", line 231, in check_browser
browser.get("https://isitdownorjust.me/instagram-com/")
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "xx.py", line 61, in
with smart_run(session):
File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/home/fredrik/InstaPy/instapy/util.py", line 1834, in smart_run
session.login()
File "/home/fredrik/InstaPy/instapy/instapy.py", line 408, in login
self.proxy_address,
File "/home/fredrik/InstaPy/instapy/login_util.py", line 284, in login_user
if not check_browser(browser, logfolder, logger, proxy_address):
File "/home/fredrik/InstaPy/instapy/login_util.py", line 262, in check_browser
logger=logger,
File "/home/fredrik/InstaPy/instapy/util.py", line 457, in update_activity
take_rotative_screenshot(browser, logfolder)
File "/home/fredrik/InstaPy/instapy/util.py", line 2377, in take_rotative_screenshot
browser.save_screenshot("{}screenshot_3.png".format(logfolder))
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 1055, in save_screenshot
return self.get_screenshot_as_file(filename)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 1032, in get_screenshot_as_file
png = self.get_screenshot_as_png()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 1064, in get_screenshot_as_png
return base64.b64decode(self.get_screenshot_as_base64().encode('ascii'))
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 1074, in get_screenshot_as_base64
return self.execute(Command.SCREENSHOT)['value']
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidSessionIdException: Message: Tried to run command without establishing a connection
write more info like version firefox etc... and your instapy settings params, before use instapy try to start one easy connection to firefox...like
from selenium import webdriver
driver = webdriver.Firefox() driver.get('http://google.com')
print driver.title
driver.quit()
where are you putting this code? the lack of capabilities seems to be the main issue at the moment
Ok, all logs say .... no connection, I repeat again write a little python script and verify.. if your platform is able to create a connection, my installation work as well with chrome and firefox, under linux and windows.
Read
login_util.py for this....
Https://isitdownorjust.me/instagram-com/
@fgisslen I use firefox 68.0.1 (64 bit) and geckodriver-v0.24.0-win64 without errors
Under your linux check if geckodriver is pointed correctly.
I had the same error but just because I had no geckodriver and no Firefox installed.
I've been experiencing similar issues for almost 2 weeks or so. Running
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://google.com')
print(driver.title)
driver.quit()
works just fine. I installed firefox to test it out and that works just fine too. I wrote a script that grabs a list of all the followers of the people who I follow:
from instapy import InstaPy
from instapy import smart_run
session = InstaPy(username="username", password="password", headless_browser=False)
search_user = ""
FOLLOWING_FOLLOWERS = []
def download_followers_of_following(session):
with smart_run(session):
who_I_follow = session.grab_following(
username=search_user, amount="full", live_match=True, store_locally=True
)
print(who_I_follow)
for user in who_I_follow:
list_of_followers = session.grab_followers(
username=user, amount="full", live_match=True
)
FOLLOWING_FOLLOWERS.append(list_of_followers)
pprint(FOLLOWING_FOLLOWERS)
download_followers_of_following(session)
search_user
in this case would be my Instagram username. This is the error message I get:
._. ._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "C:/Users/m/InstaPy"
Traceback (most recent call last):
File "C:\Users\m\Documents\Software_Development\Instagram-Bot\tests\minimal_test.py", line 4, in <module>
session = InstaPy(username="username", password="password", headless_browser=False)
File "C:\Users\m\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\instapy.py", line 318, in __init__
self.logger,
File "C:\Users\m\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "C:\Users\m\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in __init__
keep_alive=True)
File "C:\Users\m\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\m\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\m\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\m\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
[Finished in 5.4s]
This happens with the default version of the instapy-chromedriver that comes from pypi as well as chromedrivers version 76 and 77. ~3+ weeks ago I first started using Instapy and everything seemed to be working well. A week or so later these issues started popping up and as far as I know I haven't changed anything on my end (Maybe chrome or instagram updated things on their end?). Firefox produces this output:
._. ._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "C:/Users/m/InstaPy"
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-08-15 18:21:02] [username] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
INFO [2019-08-15 18:21:02] [username] -- Connection Checklist [1/3] (Internet Connection Status)
INFO [2019-08-15 18:21:03] [username] - Internet Connection Status: ok
INFO [2019-08-15 18:21:03] [username] - Current IP is "73.94.140.183" and it's from "United States/US"
INFO [2019-08-15 18:21:03] [username] -- Connection Checklist [2/3] (Instagram Server Status)
INFO [2019-08-15 18:21:09] [username] - Instagram WebSite Status: Currently Up
INFO [2019-08-15 18:21:10] [username] - Instagram Response Time: 111.333 ms
INFO [2019-08-15 18:21:10] [username] - Instagram Reponse Code: 200
INFO [2019-08-15 18:21:10] [username] - Instagram Server Status: ok
INFO [2019-08-15 18:21:10] [username] -- Connection Checklist [3/3] (Hide Selenium Extension)
INFO [2019-08-15 18:21:10] [username] - window.navigator.webdriver response: False
INFO [2019-08-15 18:21:10] [username] - Hide Selenium Extension: ok
Cookie file not found, creating cookie...
Login A/B test detected! Trying another string...
...........................................................................................................................
CRITICAL [2019-08-15 18:21:26] [username] Unable to login to Instagram! You will find more information in the logs above.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
__________________________________________________________________________________
INFO [2019-08-15 18:21:26] [username] Starting to get the `Following` data..
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2019-08-15 18:21:26] [username] Retrieving live `Following` data of username at "full" range
0/13 [+-----------------------------------] 0% |> Elapsed: 0.05 seconds |> ETA: 5.56 seconds
INFO [2019-08-15 18:21:33] [username] Grabbed 0 usernames from `Following` in 0.05 seconds
INFO [2019-08-15 18:21:33] [username] Zz :[ time to take a good nap ~sleeping 0.0 seconds
INFO [2019-08-15 18:21:33] [username] Yawn :] let's go!
[]
[]
INFO [2019-08-15 18:21:38] [username] Sessional Live Report:
|> No any statistics to show
[Session lasted 44.84 seconds]
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-08-15 18:21:38] [username] Session ended!
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
[Finished in 46.7s]
When I run :
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://google.com')
print(driver.title)
driver.quit()
I get
`Traceback (most recent call last):
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Projects/instagram/check_firefox.py", line 2, in
driver = webdriver.Chrome()
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home`
Getting the exact same issue. Any luck in fixing it?
@olishingerz kind of fixed it there : #4874 but got another pb afterward
Im getting the same error on ubuntu 16.04 server
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
update*
I followed the guide to install on a ubuntu server I found out following the guide didn't install firefox I did
sudo apt install firefox
and its working now
I had the same and figured out more or less what issue is. I can only speak for Windows, don't know if it's the same on Ubuntu.
So when running the script, Instapy automatically download the geckodriver, unzip it and put it in the path. And here is the part where the issue happens. I'm guessing it doesn't copy it correct.
Because when i'm defining the geckodriver_path and using the extracted geckodriver.exe which is downloaded directly from the source, then it works.
Again bit more clear:
Instapy download and extract it here:
InstaPy\workdir\InstaPy\assets\gecko\v0.24.0\geckodriver-v0.24.0-win32\geckodriver.exe
and here:
InstaPy\workdir\InstaPy\assets\gecko\v0.24.0\geckodriver-v0.24.0-win64\geckodriver.exe
Then it copy it to here:
InstaPy\workdir\InstaPy\assets\geckodriver.exe
Which is the default geckodriver place of Instapy. But this doesn't work.
When i know replace that one from the directly extracted, then it works.
So what i've done now, to be on secure side until it's fixed, i submit the path in the script:
# get a session!
session = InstaPy(username=insta_username,
password=insta_password,
geckodriver_path='C:\\Workplace\\Code\\InstaPy\\assets\\geckodriver.exe')
Hope that helps!
Doesn't fix the thing on raspberry (geckodriver_path='/home/joseph/InstaPy/'
)
raceback (most recent call last):
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Projects/instagram/instajoseph.py", line 16, in <module>
geckodriver_path='/home/joseph/InstaPy/')
File "/home/joseph/.local/lib/python3.5/site-packages/instapy/instapy.py", line 318, in __init__
self.logger,
File "/home/joseph/.local/lib/python3.5/site-packages/instapy/browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
self.service.start()
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: '' executable may have wrong permissions.
@papillon-unix did you remember to change permissions of the
chmod +x geckodriver
@gitpatrickhub yes I dit. Same.
@papillon-unix you have to put the whole path including the executable. not only the directory
@simonfunk just did, no change.
Workspace in use: "/home/joseph/InstaPy"
Traceback (most recent call last):
File "Projects/instagram/instajoseph.py", line 15, in <module>
geckodriver_path='/home/joseph/InstaPy/geckodriver')
File "/usr/local/lib/python3.5/dist-packages/instapy/instapy.py", line 321, in __init__
self.logger,
File "/usr/local/lib/python3.5/dist-packages/instapy/browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
keep_alive=True)
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
I'm on Mac and was getting this issue until I installed firefox
@Julio-Maldonado I have
Firefox is installed at: /usr/bin/firefox
Firefox version: Mozilla Firefox 49.0
I tried to change the path to geckodriver_path='/usr/local/bin/geckodriver'
and I get this new error (again):
Workspace in use: "/home/joseph/InstaPy"
Traceback (most recent call last):
File "Projects/instagram/instajoseph.py", line 15, in <module>
geckodriver_path='/usr/local/bin/geckodriver')
File "/home/joseph/.local/lib/python3.5/site-packages/instapy/instapy.py", line 318, in __init__
self.logger,
File "/home/joseph/.local/lib/python3.5/site-packages/instapy/browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
self.service.start()
File "/home/joseph/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
I have the same problem with the current update, while the issue is solved use this one at least for me it was the last working version:
pip uninstall instapy
pip install instapy==0.5.8
@jm-willy yes, but on this version I get blocked by Instagram on follows (which is strange because I'm careful and had never been blocked before)
I'm having the same issue. I've not updated for a couple months but pulled in all the upstream changes and now can't get it to run. Did i miss it or does instapy now run exclusively with firefox? I was using chromedriver previously.
@papillon-unix Instagram is going hard on bots for more info see the next issue: https://github.com/timgrossmann/InstaPy/issues/4891. I really hope InstaPy doesn't become obsolote but we would need more dedication
I have the same problem with the current update, while the issue is solved use this one at least for me it was the last working version:
pip uninstall instapy pip install instapy==0.5.8
The same for me. Reverted to 0.5.8, because 0.6.1 does not work with FireFox and geckodriver.
I have still not solved the firefox and geckodriver problem... Any solutions?
@yaxum what's your system? Raspberry?
@yaxum what's your system? Raspberry?
I use windows
@yaxum srry I can't help for Windows, have you tried this?
I had the same and figured out more or less what issue is. I can only speak for Windows, don't know if it's the same on Ubuntu.
So when running the script, Instapy automatically download the geckodriver, unzip it and put it in the path. And here is the part where the issue happens. I'm guessing it doesn't copy it correct.
Because when i'm defining the geckodriver_path and using the extracted geckodriver.exe which is downloaded directly from the source, then it works.Again bit more clear:
Instapy download and extract it here:
InstaPy\workdir\InstaPy\assets\gecko\v0.24.0\geckodriver-v0.24.0-win32\geckodriver.exe
and here:
InstaPy\workdir\InstaPy\assets\gecko\v0.24.0\geckodriver-v0.24.0-win64\geckodriver.exe
Then it copy it to here:
InstaPy\workdir\InstaPy\assets\geckodriver.exe
Which is the default geckodriver place of Instapy. But this doesn't work.
When i know replace that one from the directly extracted, then it works.So what i've done now, to be on secure side until it's fixed, i submit the path in the script:
# get a session! session = InstaPy(username=insta_username, password=insta_password, geckodriver_path='C:\\Workplace\\Code\\InstaPy\\assets\\geckodriver.exe')
Hope that helps!
I tried you solution but got this error:
File "quickstart.py", line 34, in
geckodriver_path='C:\Users\yaxum\InstaPy\assets\geckodriver.exe')
File "C:\Users\yaxum\AppData\Local\Programs\Python\Python37-32\lib\site-packagesinstapyinstapy.py", line 321, in __init__
self.logger,
File "C:\Users\yaxum\AppData\Local\Programs\Python\Python37-32\lib\site-packagesinstapy\browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "C:\Users\yaxum\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in __init__
keep_alive=True)
File "C:\Users\yaxum\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\yaxum\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\yaxum\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\yaxum\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
????
I'm getting this error when running InstaPy with Docker on Digital Ocean:
ERROR [2019-09-01 14:26:20] [username] Error occurred while deleting cookies from web browser!
b'Message: Failed to decode response from marionette\n'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/instapy/util.py", line 1835, in smart_run
yield
File "like_follow_supervisor.py", line 67, in <module>
unfollow=False, interact=True)
File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 3878, in like_by_feed
for i in self.like_by_feed_generator(**kwargs):
File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 4130, in like_by_feed_generator
self.user_interact_media,
File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 2152, in like_by_users
media,
File "/usr/local/lib/python3.7/site-packages/instapy/like_util.py", line 447, in get_links_for_username
browser, "profile", username, person, None, logger, logfolder
File "/usr/local/lib/python3.7/site-packages/instapy/unfollow_util.py", line 183, in get_following_status
read_xpath(get_following_status.__name__, "follow_button_XP")
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Failed to find value field
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/instapy/browser.py", line 167, in close_browser
browser.delete_all_cookies()
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 878, in delete_all_cookies
self.execute(Command.DELETE_ALL_COOKIES)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette
On session start was FOLLOWING 429 users & had 635 FOLLOWERS
[Session lasted 3.4 hours]
INFO [2019-09-01 14:26:20] [username] Session ended!
Traceback (most recent call last):
File "like_follow_supervisor.py", line 67, in <module>
unfollow=False, interact=True)
File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 3878, in like_by_feed
for i in self.like_by_feed_generator(**kwargs):
File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 4130, in like_by_feed_generator
self.user_interact_media,
File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 2152, in like_by_users
media,
File "/usr/local/lib/python3.7/site-packages/instapy/like_util.py", line 447, in get_links_for_username
browser, "profile", username, person, None, logger, logfolder
File "/usr/local/lib/python3.7/site-packages/instapy/unfollow_util.py", line 183, in get_following_status
read_xpath(get_following_status.__name__, "follow_button_XP")
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Failed to find value field
Hey all, @fgisslen
Currently I am writing a feature update to QS to add support for dynamic timing as IG switched to it during spring updates (recently noticed).
So, today I ran fresh version of InstaPy to test my newly written code and then pooh.
Then I remembered this discussion cos I received lots of emails last days from this thread ๐
@simonfunk's point gave initial idea to look for the executables and I tried as he said but nothing has changed.
After that I digged into the source code of the package we use for installing the geckodriver for us,
webdriverdownloader package;
It was a hopefully a cool small lib. So, I first tried to look for the bug at dumping the executables from @simonfunk's idea but there were no problems.
Lots of thoughts in mind, updated Firefox which was 64-bit Quantum and then looked back to assets folder and noticed it has downloaded (and then extracted) only the 32-bit version of the geckodriver ๐
Well, it was the source of the problem, but why?
Just a note that, Firefox and its webdriver - geckodriver must have match the architecture.
Again looked into the webdriverdownloader's source code to see why it gave me 32-bit of geckodriver regardless of my OS is 64-bit.
There met the big bug ๐ณ
Implementor of webdriverdownloader has used a code which returns the architercutre level of the python interpreter.
bitness = "64" if sys.maxsize > 2 ** 32 else "32"
But he should use the code to get the arch of the operating system.
The reason he/she or others use it is MOST OF TIME ppl install pythons at the same arch per their OS.
But such as me, installed 32-bit python to my 64-bit Windows ๐
That's why using that code produces this misbehaviour.
So, I invite the unique implementer of the webdriverdownloader package - @leonidessaguisagjr to solve it from there for the community.
Meanwhile, for InstaPy users there are options:
Considering, core members insists on using the webdriverdownloader package in the long run,
we can solve it 2 ways.
a-) Users goes to geckodriver's release page and download the version (~"latest") with the accurate architecture per the Firefox installed on their system and put into the workspace folder's assets directory.
# inside quickstart script
session = InstaPy(geckodriver_path="C:\\Users\\Qulu\\InstaPy\\assets\\geckodriver.exe")
b-). Fix the webdriverdownloader package temporarily by subclassing it until their maintainers release an official fix.
Open up browser.py file and
import platform, requests
gdd = GeckoDriverDownloader(asset_path, asset_path)
with
gdd = CustomizedGeckoDriverDownloader(asset_path, asset_path)
In that solution I have used,
bitness = "64" if platform.machine().endswith('64') else "32"
The only problem above solution can produce is if user installs 32-bit OS on a 64-bit machine, rare but possible.
Well, one would say it has to check the arch of Firefox installed rather than the OS.
But nowadays Firefox by default installs the version at appropriate arch level with the OS.
So, pure solution would be to look for Firefox arch and use it but I got no time at the moment to look for that. Since the situation is pretty clear, anything can happen ๐
Big thanks to @simonfunk for the hint ๐๐ผ
@uluQulu This solution worked perfectly for me! After troubleshooting for a long time and trying a ton of different possible solutions, this solution the trick. As you said, I had the 32bit version of geckodriver installed while I am running Instapy on a 64 bit system. After downloading, extracting, and replacing the 32bit version with the 64bit version Instapy started up perfectly.
Hats off to you!
@uluQulu Thank you for the tips!
I will try the the B solution since solution A did not work, the code still retreieve geckodriver 32bit file even though I have downloaded the 64 bit and removed 32 bit geckodriver :(
your solution (b) works for me. Thanks for the help. :)
Glad to help โ
@yaxum, for A to have effect, please specify the manually downloaded geckodriver executable's full path at your quickstart script while instantiating InstaPy.
# inside quickstart script
session = InstaPy(geckodriver_path="C:\\Users\\Qulu\\InstaPy\\assets\\geckodriver.exe")
So that each time it DOES NOT try to download anything and overwrite with what you have put.
Thanks that worked fine :D
@yaxum what's your system? Raspberry?
hi yaxum, saw your post. having the same problem. raspberry and firefox esr. any chance? thanks!
It worked well with the solution A) and I use Windows :)
Anybody had problem to run two scripts at the same time? I got permission denied with one script?
Could it be because they use the same geckodriver? at the same time
I had the same and figured out more or less what issue is. I can only speak for Windows, don't know if it's the same on Ubuntu.
So when running the script, Instapy automatically download the geckodriver, unzip it and put it in the path. And here is the part where the issue happens. I'm guessing it doesn't copy it correct.
Because when i'm defining the geckodriver_path and using the extracted geckodriver.exe which is downloaded directly from the source, then it works.Again bit more clear:
Instapy download and extract it here:
InstaPy\workdir\InstaPy\assets\gecko\v0.24.0\geckodriver-v0.24.0-win32\geckodriver.exe
and here:
InstaPy\workdir\InstaPy\assets\gecko\v0.24.0\geckodriver-v0.24.0-win64\geckodriver.exe
Then it copy it to here:
InstaPy\workdir\InstaPy\assets\geckodriver.exe
Which is the default geckodriver place of Instapy. But this doesn't work.
When i know replace that one from the directly extracted, then it works.So what i've done now, to be on secure side until it's fixed, i submit the path in the script:
# get a session! session = InstaPy(username=insta_username, password=insta_password, geckodriver_path='C:\\Workplace\\Code\\InstaPy\\assets\\geckodriver.exe')
Hope that helps!
Rather than moving the file content, If you are using windows, append path of "geckodriver.exe" in system environment PATH. That will solve the issue correctly.
I had the same and figured out more or less what issue is. I can only speak for Windows, don't know if it's the same on Ubuntu.
So when running the script, Instapy automatically download the geckodriver, unzip it and put it in the path. And here is the part where the issue happens. I'm guessing it doesn't copy it correct.
Because when i'm defining the geckodriver_path and using the extracted geckodriver.exe which is downloaded directly from the source, then it works.
Again bit more clear:
Instapy download and extract it here:
InstaPy\workdir\InstaPy\assets\gecko\v0.24.0\geckodriver-v0.24.0-win32\geckodriver.exe
and here:
InstaPy\workdir\InstaPy\assets\gecko\v0.24.0\geckodriver-v0.24.0-win64\geckodriver.exe
Then it copy it to here:
InstaPy\workdir\InstaPy\assets\geckodriver.exe
Which is the default geckodriver place of Instapy. But this doesn't work.
When i know replace that one from the directly extracted, then it works.
So what i've done now, to be on secure side until it's fixed, i submit the path in the script:# get a session! session = InstaPy(username=insta_username, password=insta_password, geckodriver_path='C:\\Workplace\\Code\\InstaPy\\assets\\geckodriver.exe')
Hope that helps!
Rather than moving the file content, If you are using windows, append path of "geckodriver.exe" in system environment PATH. That will solve the issue correctly.
And I am sure those on linux can do this also by using export $PATH command in system-wide configuration, or use chmod it will help out.
I got this message with an outdated Firefox. After updating my Firefox to version 69, geckodriver works gracefully.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
Worked around by adding one line in options.py
In my case the file was located at
C:\Users
add the following code:
opts["binary"] = "C:\\Program Files\\Mozilla Firefox\\firefox.exe"
this line should go above opts.update(self.log.to_capabilities())
This is just a workaround and not the permanent fix.
the last option work for me
If you still have issues after according +RX rights to folder. It should be a versionning issue.
Note that the geckodrivers V0.27(last version at this date) works with Firefox >= 79
But I have Firefox 78.0.3
So, I have downloaded, unzipped, than copied the geckodriver V0.26 to my /usr/bin/ (+chmod if needed) from
https://github.com/mozilla/geckodriver/releases/tag/v0.26.0
Than all worked well
Most helpful comment
Im getting the same error on ubuntu 16.04 server
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
update*
I followed the guide to install on a ubuntu server I found out following the guide didn't install firefox I did
sudo apt install firefox
and its working now