Traceback (most recent call last):
File "quickstart.py", line 21, in
.like_by_tags(['#healthyfood', '#healthyeatinghabits','#fitfood'], amount=300) \
File "/Users/zaelab/InstaPy/instapy/instapy.py", line 423, in like_by_tags
followed += follow_user(self.browser, user_name, self.follow_restrict)
File "/Users/zaelab/InstaPy/instapy/unfollow_util.py", line 49, in follow_user
follow_button.click()
File "/Library/Python/2.7/site-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webelement.py", line 72, in click
self._execute(Command.CLICK_ELEMENT)
File "/Library/Python/2.7/site-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webelement.py", line 461, in _execute
return self._parent.execute(command, params)
File "/Library/Python/2.7/site-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/Library/Python/2.7/site-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Element is not clickable at point (935, 14). Other element would receive the click:
(Session info: chrome=58.0.3029.110)
(Driver info: chromedriver=2.29.461585 (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.12.5 x86_64)
@ulianakucheriava Please give some info about how and where your run it.
Do you close the browser window or minimise it?
I had this bug before when running it on my own computer. What happens is that navbar slides in when the script tries to click the button (you can verify that by searching for the class of the Element that would receive the click and see that its the navbar)
2 Options that worked for me solving this:
1) make sure your automated chrome is full screen and leave your computer to it.
2) Run your script on a server (like digital ocean).
Cheers
Fabian
I am seeing this same issue (see below), but I am using the noGUI=True
parameter and running on a Digital Ocean server. My logs go like this
Logged in successfully!
Tag [1/19]
--> [a tag]
[1/120]
Image from: ...
Number of Followers: ...
Link: https://www.instagram.com/p/...
Description: ...
...
--> Image Liked!
--> Not commented
--> Now following
[more likes/follows/comments in between]
[10/120]
Image from: ...
Number of Followers: ...
Link: https://www.instagram.com/p/...
Description: ...
--> Image Liked!
--> Commented: Sweet post!
Crash:
Element <button class="...">...</button> is not clickable at point (..., ...). Other element would receive the click: ...
I am using Python 2.7.12
I've also attempted to drop the noGUI
param, but I get a different error, supposedly the one I'm suppose to get when running without a display. (no luck there)
Here's the full stack trace
Traceback (most recent call last):
File "script_like_follow.py", line 27, in <module>
.like_by_tags(hashtags, amount=120) \
File "/root/InstaPy/instapy/instapy.py", line 423, in like_by_tags
followed += follow_user(self.browser, user_name, self.follow_restrict)
File "/root/InstaPy/instapy/unfollow_util.py", line 49, in follow_user
follow_button.click()
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webelement.py", line 72, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webelement.py", line 461, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.53.6-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Element <button class="_ah57t _84y62 _i46jh _rmr7s">...</button> is not clickable at point (688, 14). Other element would receive the click: <div class="_df358">...</div>
(Session info: chrome=59.0.3071.109)
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.4.0-53-generic x86_64)
I sounds to me like the like
button is "hidden" by another element, like a nav bar or the bottom toolbar. I'm not sure how this can be the case tho when using noGUI=True
on a VPS.
@blesson3 I think this is the follow button, don't you think?
If the error throws after the commenting, the liking is already done.
Next would be pressing the following button.
Could you post a link to a page on which this happened?
I get this error constantly every time I run my script... this stresses my nerves for days now. I will report the last error message with the page to the picture etc... As it throws next i will report it to you with my recent observations
I'm no longer experiencing the issue, so weird. Also yes, follow button
So, i got the error again.
This is the output:
[8/100]
Image from: b'francisthepom'
Link: b'https://www.instagram.com/p/BWBCvClly0Z/?tagged=pom'
Description: b'Nap time\n\n#spitz #spitzalemao #lulu #luludapomerania #spitzalemaobrasil #pom #pomeranian #pompom #lovespitz #instapet #instadog #raposinha #dog #doglovers #cachorro #ilovemydog #francis #francisthepom #papoutudu #francisvolpe #francislindao #franciskinho'
--> Image Liked!
--> Commented: b'Awesome!'
Traceback (most recent call last):
File "quickstart.py", line 30, in <module>
session.like_by_tags(like_tags, amount=100, media='Photo')
File "/root/last/InstaPy/instapy/instapy.py", line 423, in like_by_tags
followed += follow_user(self.browser, user_name, self.follow_restrict)
File "/root/last/InstaPy/instapy/unfollow_util.py", line 49, in follow_user
follow_button.click()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 72, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 461, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Element <button class="_ah57t _84y62 _i46jh _rmr7s">...</button> is not clickable at point (688, 14). Other element would receive the click: <div class="_df358">...</div>
(Session info: chrome=59.0.3071.115)
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.4.0-78-generic x86_64)
My observations so far:
I will report back when it happens the next time, again with the log snippet... so far, any ideas @timgrossmann ?
This is exactly the same issue as https://github.com/timgrossmann/InstaPy/issues/325.
As I stated there before:
When the script tries to click follow another object (with the class _df358 would receive the click). The object that would receive the click is the navbar. So my guess is that some pages are layouted differently and the script wants to click the follow button too fast, but then the navbar slides in. Thus, preventing the click. Maybe scrolling up the page and then waiting a fraction of a second could solve the problem.
You can try this for yourself by going to https://www.instagram.com/p/BWBCvClly0Z/?tagged=pom and then
=> you'll see that the navbar covers the follow button for a second.
Maybe adding something like this before the follow click or just a bit of a wait before the follow click coud help:
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;
Actions builder = new Actions(driver);
Action mouseOverHome = builder.moveByOffset(0, -100)
Ah very interesting... did you try the code you provided yourself or is this just an idea?
Why did changing over to Digital Ocean fixed the problem for you? I do not really understand this...
As I'm running my script on a server too (a much more powerful than the droplets on DO)
In #325 you say something about "running script with python3.5..."
I ran my script with python3 until now... could this have any effect to this specific problem?
Just an idea, it's also a bit hard to try, because I don't get the bug anymore.
I am not sure if digital ocean actually fixed it or if it was something else. But after switching to digital ocean I didn't encounter the bug anymore.
I suspected the reason for the bug being a small browser windows on my local machine. I then assumed it would be running in full screen on digital ocean. If this were the case then digitial ocean would fix the bug.
Regarding the python versions: try to figure out what python3 Version your server runs by executing 'python3 -V' if it's 3.5.x, just run your script with python 3.5, might also
Work for you.
Cheers
Im getting the same error with the latest version
I'm getting the same error. Running it on DO, 2GB RAM server. Also, I'm using noGUI=TRUE
since it is on a server.
Also, what's weird is that I am running the script on 3 different servers for 3 different accounts. 2 of them are on DO and one of them is on Vultr.
The one that throws the error is one of the account running at DO. The other two accounts (1 at Vultr and 1 at DO) works fine.
I checked the logs again. This was the 38th image, and there were various instances previously, where the bot liked, commented and followed without any error!
[38/101]
Image from: b'a_h_m_e_d_a_b_a_d__s_h_o_u_t'
Number of Followers: 785
Link: b'https://www.instagram.com/p/BWmNJuUlnDg/?tagged=desi'
Description: b"we welcome you at Ahmedabad shout out \xf0\x9f\x91\x8dFollow @Y_A_S_H_9098 and follow our page @ahmedabad swagers for shotout \xf0\x9f\x98\x8a\n\n1-$
--> Image Liked!
--> Commented: b'Awesome!'
Traceback (most recent call last):
File "quickstart.py", line 33, in
session.like_by_tags(['#desi'], amount=randint(minTag, maxTag))
File "/root/InstaPy/instapy/instapy.py", line 457, in like_by_tags
followed += follow_user(self.browser, self.follow_restrict, self.username, user_name)
File "/root/InstaPy/instapy/unfollow_util.py", line 130, in follow_user
follow_button.click()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 72, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 461, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Element is not clickable at point (688,$
(Session info: chrome=59.0.3071.115)
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.4.0-81-generic x86_64)
@timgrossmann Please help here.
@kushpvo I hope you do understand, that I can't afford to work on this my whole time... This does not generate any money for me, so you have to wait until I can find some time to look into it.
I'm sorry
@timgrossmann Hey Tim! I totally understand that. I really appreciate your time and efforts for this project! 馃憤
@kushpvo as stated earlier you could try to fix this yourself. Selenium isn't really that hard.
As I stated there before:
When the script tries to click follow another object (with the class _df358 would receive the click). The object that would receive the click is the navbar. So my guess is that some pages are layouted differently and the script wants to click the follow button too fast, but then the navbar slides in. Thus, preventing the click. Maybe scrolling up the page and then waiting a fraction of a second could solve the problem.
You can try this for yourself by going to https://www.instagram.com/p/BWBCvClly0Z/?tagged=pom and thenScroll all the way up
Scroll down
=> you'll see that the navbar covers the follow button for a second.Maybe adding something like this before the follow click or just a bit of a wait before the follow click coud help:
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;Actions builder = new Actions(driver);
Action mouseOverHome = builder.moveByOffset(0, -100)
Just understand why it happens, on my previous machine it occurred every time because I had low RAM and instapy had to work on swap, which is slower. So the selenium browser couldn't load all element and thus fail to click something, now that I switched to a 1.75GB RAM server, the error went away.
@FBosler I did try that before posting here and it didn't help. The reason why it didn't help could be because I'm running it on a sever without GUI.
@Naramsim I did think that 2GB RAM server won't be enough (though it's more than enough) so i tried on 4GB server but the problem persists.
Hey, maybe your problem is pending/zombie process that eats your ram, after every job, do a pkill chrome && pkill xvfb
I run the script fine now with 1.75 GB RAM
@Naramsim How can I add/import this command into the quickstart.py file itself?
A side note: I'm running the script on a vultr 2GB server for days (looped the script with delays) and it hasn't faced a single problem. The problem I have is running it on 2GB DO
Update: I was running my code as nohup python3.5 -u quickstart.py &
and it used to crash. Now, I tried to run it as python3.5 quickstart.py
and observe it. It did not crash.
Thanks 馃憤
What I麓m doing right now is:
from subprocess import call
def job():
try:
print('Starting...')
...
except:
...
finally:
call(["pkill", "chrome"])
call(["pkill", "Xvfb"])
this bug is a bastard. It only happens when you like and comment and then try to follow the same user.
How can I actually see what is happening when I run it on a server? @timgrossmann
Thanks
Hey all and @timgrossmann
Sorry to ask another question - I'm quite happy to try and fix this but I'm sure the way I'm testing things is basic.
I just make changes to the script and then sit there watching the server ssh terminal output until it breaks, if it does, I do it again...it's long.
How can I speed this up or get some kind of visual?
Many thanks!
@RealMakAttak debug locally using noGui=False
@Naramsim Thanks for your reply. I tried doing it locally on docker with nogui=false, I also logged in to tightvnc at port 5900 as suggested in the docker instapy docs - all I get is a stream of my screen, no bot.
Can you think of what I am doing wrong?
Thank you
@RealMakAttak Obviously docker can't render what's going on, it does not run on monitors. You have to install the project without using Docker.
I'm having the same issue as many of you running nogui=true on DO. Is there a way to at least catch the error and continue the script so that it doesn't kill the whole process?
@platramos try/except
blocks
Hey, guys.
I fixed it just like @FBosler said: by scrolling back to the top every time i want to follow somebody, and this fixes the issue. Think it might be useful, as it still occurs to some users, like in #546.
I'll try to make a pull request, but I'm pretty new to merging and pulling branches etc., so it might take some time.
@diveu can you report any progress with this? All the issues I had in #546 has been resolved except for this one.
as @RealMakAttak said, this happens when bot like, comment and follow
iv'e added these lines to /instapy/unfollowutil.py before the follow_button.click() line at 139
sleep(1)
browser.execute_script("window.scrollTo(0,0);")
sleep(3)
follow_button.click()
solved the issue for me (so far)
Most helpful comment
as @RealMakAttak said, this happens when bot like, comment and follow
iv'e added these lines to /instapy/unfollowutil.py before the follow_button.click() line at 139
sleep(1)
browser.execute_script("window.scrollTo(0,0);")
sleep(3)
follow_button.click()
solved the issue for me (so far)