InstaPy icon indicating copy to clipboard operation
InstaPy copied to clipboard

follow_user_followers crash after follow 5 account

Open theRouter opened this issue 8 years ago • 14 comments

Expected Behavior

follow_user_followers crash after follow 5 account . can any body help me?

Current Behavior

INFO [2018-08-29 03:04:29] [ayoob.pirooz] Simulated follow : 5 Traceback (most recent call last): File "quickstart.py", line 34, in session.follow_user_followers(['radintour','spad_tours','spadanaclub'], amount=500, randomize=False, interact=True) File "C:\Users\Administrator\Desktop\ayoob\instapy\instapy.py", line 2052, in follow_user_followers self.logfolder) File "C:\Users\Administrator\Desktop\ayoob\instapy\unfollow_util.py", line 924, in get_given_user_followers channel, logger, logfolder) File "C:\Users\Administrator\Desktop\ayoob\instapy\unfollow_util.py", line 712, in get_users_through_dialog quick_username = dialog_username_extractor(quick_button) File "C:\Users\Administrator\Desktop\ayoob\instapy\unfollow_util.py", line 760, in dialog_username_extractor if person and hasattr(person, 'text') and person.text: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 76, in text return self._execute(Command.GET_ELEMENT_TEXT)['value'] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute return self._parent.execute(command, params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute self.error_handler.check_response(response) File "C:\Users\Administrator\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.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document (Session info: headless chrome=68.0.3440.106) (Driver info: chromedriver=2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab),platform=Windows NT 10.0.14393 x86_64)

Possible Solution (optional)

InstaPy configuration

theRouter avatar Aug 28 '18 22:08 theRouter

Did you have latest version ?

CharlesCCC avatar Aug 28 '18 23:08 CharlesCCC

I have the lasted version and got the same error too

narchiii avatar Aug 29 '18 05:08 narchiii

If I use "headless_browser=True" ,I have the same error.

jat-x avatar Aug 29 '18 06:08 jat-x

Having same issue. Also using headless.

boldestfortune avatar Aug 29 '18 13:08 boldestfortune

having same issue with latest version also using headless, used to work in prev versions

simonecorsi avatar Aug 29 '18 14:08 simonecorsi

guys, please reference #2782 for some suggested solution from @uluQulu . give a try and let us know in there. I will close this duplicated thread for now.

CharlesCCC avatar Aug 29 '18 14:08 CharlesCCC

@CharlesCCC I try this solutions but I have the same error. (fix instapy/unfollow_util.py)

Traceback (most recent call last): File "C:\Users\Марина\Documents\GitHub\InstaPy\NEWsetup.py", line 170, in session.follow_user_followers(list_fuf, amount=amount_fuf, randomize=random_fuf, sleep_delay=120) File "C:\Users\Марина\Documents\GitHub\InstaPy\instapy\instapy.py", line 2052, in follow_user_followers self.logfolder) File "C:\Users\Марина\Documents\GitHub\InstaPy\instapy\unfollow_util.py", line 923, in get_given_user_followers channel, logger, logfolder) File "C:\Users\Марина\Documents\GitHub\InstaPy\instapy\unfollow_util.py", line 712, in get_users_through_dialog quick_username = dialog_username_extractor(quick_button) File "C:\Users\Марина\Documents\GitHub\InstaPy\instapy\unfollow_util.py", line 760, in dialog_username_extractor if person and hasattr(person, 'text') and person.text: File "C:\Users\Марина\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 76, in text return self._execute(Command.GET_ELEMENT_TEXT)['value'] File "C:\Users\Марина\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute return self._parent.execute(command, params) File "C:\Users\Марина\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute self.error_handler.check_response(response) File "C:\Users\Марина\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.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document (Session info: headless chrome=68.0.3440.106) (Driver info: chromedriver=2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 6.2.9200 x86_64)

jat-x avatar Aug 29 '18 19:08 jat-x

@jat-x Have a read https://github.com/timgrossmann/InstaPy/issues/2774#issuecomment-417070803 for fresh new solution.


Cheers 😁

uluQulu avatar Aug 29 '18 19:08 uluQulu

@uluQulu can you send a link for fresh new solution?

jat-x avatar Aug 29 '18 19:08 jat-x

@jat-x It is in https://github.com/timgrossmann/InstaPy/issues/2774#issuecomment-417070803.

Watch #2774 to get the solution on this issue.


Cheers 😁

uluQulu avatar Aug 29 '18 19:08 uluQulu

@uluQulu I try your solution, but new error Traceback (most recent call last): File "C:\Users\Марина\Documents\GitHub\InstaPy\NEWsetup.py", line 118, in from instapy import InstaPy File "C:\Users\Марина\Documents\GitHub\InstaPy\instapy_init_.py", line 2, in from .instapy import InstaPy File "C:\Users\Марина\Documents\GitHub\InstaPy\instapy\instapy.py", line 22, in from .comment_util import comment_image File "C:\Users\Марина\Documents\GitHub\InstaPy\instapy\comment_util.py", line 5, in from .util import update_activity File "C:\Users\Марина\Documents\GitHub\InstaPy\instapy\util.py", line 17, in from .quota_supervisor import quota_supervisor ModuleNotFoundError: No module named 'instapy.quota_supervisor'

jat-x avatar Aug 29 '18 19:08 jat-x

@jat-x remove the line that have quota_supervisor (this is something that still pending for merge to master)

CharlesCCC avatar Aug 29 '18 20:08 CharlesCCC

@jat-x Please read it fully, you probably took the changes from the commit shared at the top of comment. That commit is part of my live PR with lots of structural changes. And for the current version of InstaPy you should apply the changes in that comment manually.

Let's discuss it in #2774 if you have further problems


Cheers 😁

uluQulu avatar Aug 29 '18 20:08 uluQulu

@jat-x please discuss in #2774 instead of in here. thank you.

CharlesCCC avatar Aug 29 '18 20:08 CharlesCCC