Hi,
I just installed instapy on my Pi3.
When running the script I get an error after a couple of succeded follows, can you help me with this?
Traceback (most recent call last):
File "/home/pi/InstaPy/follow-unfollow.py", line 50, in
randomize=False, interact=False)
File "/home/pi/.local/lib/python3.5/site-packages/instapy/instapy.py", line 3255, in follow_user_followers
interact)
File "/home/pi/.local/lib/python3.5/site-packages/instapy/instapy.py", line 1088, in follow_by_list
self.logfolder)
File "/home/pi/.local/lib/python3.5/site-packages/instapy/unfollow_util.py", line 764, in follow_user
naply = get_action_delay("follow")
File "/home/pi/.local/lib/python3.5/site-packages/instapy/util.py", line 1771, in get_action_delay
custom_delay = config[action]
KeyError: 'follow'
I used the template: basic_follow-unfollow_activity.py
and made the following changes:
session.follow_user_followers(['user1', 'user2', 'user3'], amount=5,
session.unfollow_users(amount=500, InstapyFollowed=(False, "nonfollowers"),
session.follow_user_followers(['user1', 'user2', 'user3'], amount=5,
session.unfollow_users(amount=500, InstapyFollowed=(False, "nonfollowers"),
session.unfollow_users(amount=500, InstapyFollowed=(True, "all"),
style="FIFO", unfollow_after=1,
sleep_delay=601)
Thank you
Collin
Looks like an error with getting the follow delay. And by the referenced issue looks like delays aren't initialized to a default value.
Add this line after the line that starts with [with smart_run].
session.set_action_delays(enabled=True,
like=1,
comment=1,
follow=1,
unfollow=1)
That will set all the custom delays to 1 second.
I have the same bug with config variable (latest InstaPy version installed):
File "/home/maxim/bot/instapy/instapy.py", line 1394, in like_by_locations
liked_img)
File "/home/maxim/bot/instapy/like_util.py", line 696, in like_image
naply = get_action_delay("like")
File "/home/maxim/bot/instapy/util.py", line 1771, in get_action_delay
custom_delay = config[action]
KeyError: 'like'
Share your whole config file.
Unfortunate, still same error. Here is my file
follow-unfollow.txt
Actually, I have the same, but with Likes after InstaPy update:
Traceback (most recent call last):
File "itbs_insta.py", line 35, in <module>
session.like_by_tags(['hacker'], amount=15, skip_top_posts=False)
File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 1811, in like_by_tags
liked_img)
File "/usr/local/lib/python3.7/site-packages/instapy/like_util.py", line 696, in like_image
naply = get_action_delay("like")
File "/usr/local/lib/python3.7/site-packages/instapy/util.py", line 1771, in get_action_delay
custom_delay = config[action]
KeyError: 'like'
same issue, key error for likes and follows...
Same issue.
Looks like an error with getting the follow delay. And by the referenced issue looks like delays aren't initialized to a default value.
Add this line after the line that starts with [with smart_run].
session.set_action_delays(enabled=True, like=1, comment=1, follow=1, unfollow=1)That will set all the custom delays to 1 second.
This is solution. Thx
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
Most helpful comment
Looks like an error with getting the follow delay. And by the referenced issue looks like delays aren't initialized to a default value.
Add this line after the line that starts with [with smart_run].
session.set_action_delays(enabled=True, like=1, comment=1, follow=1, unfollow=1)That will set all the custom delays to 1 second.