Instapy: Code not working with instapy 0.6.1

Created on 14 Aug 2019  路  13Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

Just run normal

Current Behavior

Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\InstaPy\quickstart.py", line 13, in
headless_browser=False)
File "C:\Users\Administrator\Desktop\InstaPy\instapy\instapy.py", line 318, in __init__
self.logger,
File "C:\Users\Administrator\Desktop\InstaPy\instapy\browser.py", line 114, in set_selenium_local_session
options=firefox_options,
File "C:\Python37-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in __init__
keep_alive=True)
File "C:\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\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

Possible Solution (optional)

InstaPy configuration

imports

from instapy import InstaPy
from instapy import smart_run

login credentials

insta_username = 'xxx'
insta_password = 'xxx'

get an InstaPy session!

set headless_browser=True to run InstaPy in the background

session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False)

with smart_run(session):
""" Activity flow """
# general settings
session.set_relationship_bounds(enabled=True,
delimit_by_numbers=True,
max_followers=2000,
min_followers=400,
min_following=200)

session.set_skip_users(skip_private=True,
                   private_percentage=100,
                   skip_no_profile_pic=True,
                   no_profile_pic_percentage=100,
                   skip_business=True,
           skip_non_business=False,
                   business_percentage=100)



# activities

""" Massive Follow of users followers (I suggest to follow not less than
3500/4000 users for better results)...
"""
session.follow_user_followers(['user1'], amount=100,
                              randomize=False, interact=False, sleep_delay=1800)


""" Clean all followed user - Unfollow all users followed by InstaPy...
"""
session.unfollow_users(amount=500, InstapyFollowed=(True, "nonfollowers"),
                       style="FIFO", unfollow_after=20 * 60 * 60,
                       sleep_delay=601)
wontfix

Most helpful comment

python3 -m pip install --user instapy==0.5.8 --force-reinstall

All 13 comments

Do you use Firefox?

i got the same issue like you/

i am getting this after 2 min of run i use firefox
Traceback (most recent call last):
File "C:\Users\Jalebee\Desktop\nepi\instapy-quickstart-master\quickstart_templates\good_commenting_strategy_and_new_qs_system.py", line 89, in
session.like_by_tags(my_hashtags, amount=60, media=None)
File "C:\Users\Jalebee\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\instapy.py", line 1939, in like_by_tags
liked_img,
File "C:\Users\Jalebee\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\like_util.py", line 726, in like_image
if quota_supervisor("likes") == "jump":
File "C:\Users\Jalebee\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\quota_supervisor.py", line 41, in quota_supervisor
quota_state = controller(job)
File "C:\Users\Jalebee\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\quota_supervisor.py", line 59, in controller
supervise, interval, target = inspector(job, peaks)
File "C:\Users\Jalebee\AppData\Local\Programs\Python\Python36\lib\site-packages\instapy\quota_supervisor.py", line 118, in inspector
if hourly_record >= hourly_peak:
TypeError: '>=' not supported between instances of 'int' and 'tuple'

Check the new settings after the upgrade.
Example:
After - peak_likes (57, 300)
Before - peak_likes_hourly=57, peak_likes_daily=300

Same issue here too? Why is it referencing Firefox - I've always used Chrome with instapy (forgive my ignorance)? [Oh, just read FF is used as default now]

...I reverted back to 0.5.8 and it works as expected; 0.6 and 0.6.1 get the above error? Thanks

How did you revert back to 0.5.8? I am currently having my own issues as well..

How can you revert back to 0.5.8 ?

python3 -m pip install --user instapy==0.5.8 --force-reinstall

Installed Firefox and it finally worked, seems like instapy's last version doesn't support chrome anymore

python3 -m pip install --user instapy==0.5.8 --force-reinstall

so i just tried this and got an error

C:\Users........>python -m pip install --user instapy==0.5.8 --force reinst
all
Collecting instapy==0.5.8
Downloading https://files.pythonhosted.org/packages/1e/ca/8adeb1a3ac2307364648
4be56d23a2c7d37084faf07110559715f08141cb/instapy-0.5.8-py2.py3-none-any.whl (231
kB)
|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 235kB 1.3MB/s
Collecting reinstall
ERROR: Could not find a version that satisfies the requirement reinstall (from
versions: none)
ERROR: No matching distribution found for reinstall

what should i do?

python3 -m pip install --user instapy==0.5.8 --force-reinstall

I'm blocked on follow when getting back to this version. While the 0.6 version still display the "Unable to find a matching set of capabilities" error..

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

Was this page helpful?
0 / 5 - 0 ratings