Closed nazariyv closed 5 years ago
What I can see here is that it should unfollow them after 8 hours so if you start this config after 8 hours it should unfollow them again.
13:00 script started followed 100 people for example unfollowed 0 00:00 script started again followed 100 people but unfollowed arround 50-150 people that are the followers you we're following at 13:00 I hope this makes it clear for you :)
Actually, not the case. Still same problem.
Can at least someone say where to look? The problem is that it cannot find the users to unfollow. It successfully grabs followers, but it always grabs 0 following, or rather 0 to unfollow....
Same problem here does not unfollow at all
same problem here
Same problem here.
Now at least I'm getting some sort of a traceback, I think this is related to the issue:
Traceback (most recent call last):
File "quickstart_en.py", line 94, in <module>
interact=True)
File "/home/nazariy/git/InstaPy/instapy/instapy.py", line 2487, in follow_user_followers
self.logfolder)
File "/home/nazariy/git/InstaPy/instapy/unfollow_util.py", line 906, in get_given_user_followers
channel, jumps, logger, logfolder)
File "/home/nazariy/git/InstaPy/instapy/unfollow_util.py", line 713, in get_users_through_dialog
person_list = dialog_username_extractor(buttons)
File "/home/nazariy/git/InstaPy/instapy/unfollow_util.py", line 736, in dialog_username_extractor
if person and hasattr(person, 'text') and person.text:
File "/home/nazariy/anaconda/envs/insta_fame/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 76, in text
return self._execute(Command.GET_ELEMENT_TEXT)['value']
File "/home/nazariy/anaconda/envs/insta_fame/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 628, in _execute
return self._parent.execute(command, params)
File "/home/nazariy/anaconda/envs/insta_fame/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "/home/nazariy/anaconda/envs/insta_fame/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
(Session info: chrome=69.0.3497.100)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.15.0-36-generic x86_64)
Here is the snapshot of my packages:
certifi==2018.8.24
chardet==3.0.4
clarifai==2.3.1
configparser==3.5.0
EasyProcess==0.2.3
emoji==0.5.0
future==0.16.0
gitdb2==2.0.4
GitPython==2.1.11
grpcio==1.15.0
idna==2.7
instagram-py==0.0.1
jsonschema==2.6.0
numpy==1.15.1
Pillow==5.2.0
plyer==1.3.0
protobuf==3.6.1
PyVirtualDisplay==0.2.1
requests==2.19.1
selenium==3.14.0
six==1.11.0
smmap2==2.0.4
urllib3==1.23
Updating to latest chromedriver does not fix the issue.
@uluQulu @timgrossmann can you have a look, please?
This fix: https://github.com/timgrossmann/InstaPy/pull/3159/commits/d90df65384777aa8d8cd9dde7b35f49cbfa5104c
doesn't help either. It still gives this well-versed error: "There are no any users available to unfollow"...
The problem starts here. The automatedFollowPool is:{'all':{},'eligible':{}}
and thus unfollowList is an empty list:
elif InstapyFollowed == True:
logger.info("Unfollowing the users followed by InstaPy\n")
unfollow_list = list(automatedFollowedPool["eligible"].keys())
But I can see that it gets the allfollowing number correctly.
Ok, I have identified the problem in my case. When set_automated_follow_pool is entered into, try doesn't execute and BaseException is caught. In my case it is:
Error occurred while generating a user list from the followed pool!
b'line contains NULL byte'
After this happens, we are left with automatedFollowPool
that has empty dict for all and eligible. I will have a look at how to fix this error now.
If your problem is the same as mine, i.e. you have a NULL byte in your .csv (I really have no idea what is causing this). Then here is how you fix it.
unfollow_util.py
at the very top (where the imports are):
import codecs
set_automated_followed_pool
method:
def fix_nulls(s):
for line in s:
yield line.replace('\0', '')
set_automated_followed_pool
method: reader = csv.reader(followedPoolFile)
with this line:
reader = csv.reader(fix_nulls(codecs.open(followedPoolFile.name, 'r+', 'utf-8')))
And you are golden. Unfollowing should work now.
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
@nazariyv I have this problem periodically when I don't practice good unfollow hygiene (still following people after +4 days when i neglect to run the script)
Cannot identify the null line you talk about in the csv. I figure you mean file user_followedPool.csv. Do you know of manually fixing the null element? Right now this entire file is blank for me, is that what you mean? I wonder if there is a hidden capacity of this csv?
I realised this lot later. I don't know since when I am shadowbanned. I have stopped instapy after using for 3 months. None of my posts show on discovery or on hashtags page. I would request all instapy users to check if they are shadow banned or not.
Expected Behavior
Unfollows users
Current Behavior
Does not talk about shadowbans, just cannot retrieve any following to unfollow:
After getting a list of my followers
Possible Solution (optional)
InstaPy configuration
literally just that