Instapy: isnt unfollowing well

Created on 23 Jul 2018  路  13Comments  路  Source: timgrossmann/InstaPy

I imputed 400 for the program to unfollow, but this 48, 32, 24 is all i get

Current Behavior

Possible Solution (optional)

INFO [2018-07-23 08:20:31] [uvibetv] Starting to unfollow users..

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
ERROR [2018-07-23 08:20:31] [uvibetv] set_automated_followed_pool error line contains NULL byte
INFO [2018-07-23 08:20:31] [uvibetv] Unfollowing the users you are following
INFO [2018-07-23 08:21:26] [uvibetv] Failed to load desired amount of users
INFO [2018-07-23 08:21:31] [uvibetv] Total 24 users available to unfollow ~not found in 'followedPool.csv': 24 | didn't pass unfollow_after: 0
INFO [2018-07-23 08:21:31] [uvibetv] Could not grab requested amount of usernames to unfollow: 24/400 ~using available amount
INFO [2018-07-23 08:21:34] [uvibetv] --> Ongoing Unfollow 1/24, now unfollowing: b'ch.arity1327'
INFO [2018-07-23 08:21:34] [uvibetv] --> Removed '2018-07-17 15:57 ~ ch.arity1327' from followedPool.csv file

wontfix

Most helpful comment

@uluQulu
error line contains NULL byte
Please go the the follower pool file and remove NULL bytes (notepad++ look for \0 in extended mode search)

All 13 comments

@uluQulu
error line contains NULL byte
Please go the the follower pool file and remove NULL bytes (notepad++ look for \0 in extended mode search)

@uluQulu Thank you!!!!

hi I have the same problem but always with 48 ... I can't find the null char, I have tried "extended mode" :(

@uluQulu what is the origin of this error "NULL bytes" to I try to understand how to solve my, I think it is similar.

@sionking I think we have agreed on writing policy, but I don't see it in PRs 馃榿 by you

Hey @pedromoto4
Give a good feedback about your problem. Also, post the full (_except personal information_) console output of that part.
I will help you solve it 馃帀

  • But if you have no any problems or already solved them AND just wonders _what is NULLifying the data_, well, its roots goes to the _unexpected external terminations_ while writing data and its solution is ready and will hopefully be written by @sionking soon 馃帄 but yet don't worry, that situation is not gonna happen too frequently.

Oky @uluQulu later I will put all information. Tell me just, I put here or should I open other issue?

I think this thread fits it well, @pedromoto4

@uluQulu
I think the PR is ready, making changes for python2 not going to be entered soon, since I never used python2. you are more than welcome to add your stuff.

BTW since atomic writing I got 0 file corrupted.

Expected Behavior

So I try to unfollow 280 followers but the result always are 48 unfollows :(

Current Behavior

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2018-07-25 07:56:36] [myaccount] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
...................................................................
INFO [2018-07-25 07:57:07] [myaccount] Logged in successfully!
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


INFO [2018-07-25 07:57:10] [myaccount] Starting to unfollow users..
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2018-07-25 07:57:10] [myaccount] Unfollowing the users you are following
INFO [2018-07-25 07:58:06] [myaccount] Failed to load desired amount of users
INFO [2018-07-25 07:58:16] [myaccount] Total 48 users available to unfollow ~not found in 'followedPool.csv': 16 | didn't pass unfollow_after: 0
INFO [2018-07-25 07:58:16] [myaccount] Could not grab requested amount of usernames to unfollow: 48/280 ~using available amount
INFO [2018-07-25 07:58:25] [myaccount] --> Ongoing Unfollow 1/48, now unfollowing: accouns1
INFO [2018-07-25 07:58:45] [myaccount] --> Ongoing Unfollow 2/48, now unfollowing: account2

InstaPy configurationimport os

import time
from tempfile import gettempdir
from selenium.common.exceptions import NoSuchElementException
from instapy import InstaPy

insta_username = 'myaccount'
insta_password = 'mypas'

session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=True,
multi_logs=True
)

try:
session.login()
session.unfollow_users(amount=280, allFollowing=True, style="RANDOM", unfollow_after=36060, sleep_delay=20)

except Exception as exc:
# if changes to IG layout, upload the file to help us locate the change
if isinstance(exc, NoSuchElementException):
file_path = os.path.join(gettempdir(), '{}.html'.format(time.strftime('%Y%m%d-%H%M%S')))
with open(file_path, 'wb') as fp:
fp.write(session.browser.page_source.encode('utf8'))
print('{0}\nIf raising an issue, please also upload the file located at:\n{1}\n{0}'.format(
'*' * 70, file_path))
# full stacktrace when raising Github issue
raise

finally:
# end the bot session
session.end()

@sionking, the solution is easy as I remember from the last conversation we had on it but I have truly less time to invest in it.

@pedromoto4
If you are using allFollowing _unfollow method_, having NULL bytes or any other corruption in local data files have no any effect on decreasing the amount of the usernames, instead once those data files are healthy, it will check the generated list (_from live queries_) against the unfollow_after parameter and if any user does not pass, it will remove it from that freshly generated unfollow list.

Can you confirm:

  • Do you really always get 48 users? (_if not, give a precise answer: "not always?", "sometimes 24", etc.._)
  • Do you have a good internet bandwith and is it not overloaded?
  • Do you have the latest commits from the repo? (see git status)
  • Run the same unfollow feature after taking a big break (_e.g. 1 hour of inactivity_) and see if persists.
  • Update your web browser and its web driver to fresher versions.
  • Any other information you think can make a problem.

If there is no problems in the stages above, we will continue to troubleshoot through the source code.

Chill 馃帄

Ok @uluQulu lets figure out what is this.

Do you really always get 48 users? (if not, give a precise answer: "not always?", "sometimes 24", etc..)
Im trying and until this moment I just saw 48 but I need to confirm the result in the crontab I think there is unfollowing 48, 24, .....

Do you have a good internet bandwith and is it not overloaded?
Yes I have, this should not be a problem :)

Do you have the latest commits from the repo? (see git status)
Sorry I'm not familiarized with git how do I see "git status" ? is this ?
neo@PC2:~/InstaBot/InstaPy$ git status help
No ramo master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

Run the same unfollow feature after taking a big break (e.g. 1 hour of inactivity) and see if persists.
yes.... still the same result

Update your web browser and its web driver to fresher versions.
later I will do this

Any other information you think can make a problem.
Im no sure but may you can advice me to try others "unfollowing" commands combinations to see the result.... ok later I will complete this

Hi Finally I have had some time to do some tests, so....
I have cloned the last version os InstaPy and download the last version of chromeDrive.
And every thing start to work well 馃懐 馃懐 .

For me this issue are closed .... this is just versions updates ;)
thank all and especially @uluQulu

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

Related issues

awesome205 picture awesome205  路  71Comments

andifds picture andifds  路  43Comments

fgisslen picture fgisslen  路  48Comments

lairdep23 picture lairdep23  路  47Comments

cormo1990 picture cormo1990  路  48Comments