Instapy: Service stops after few seconds: error related to chromedriver?

Created on 3 Jun 2018  路  15Comments  路  Source: timgrossmann/InstaPy

INFO [2018-06-03 12:58:06] [spectures] Session started - 2018-06-03 12:58:06
Cookie file not found, creating cookie...


If raising an issue, please also upload the file located at:
/tmp/20180603-125841.html


INFO [2018-06-03 12:58:41] [spectures] Session ended - 2018-06-03 12:58:41
INFO [2018-06-03 12:58:41] [spectures] --------------------

Traceback (most recent call last):
File "quickstart.py", line 25, in
session.login()
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 322, in login
self.bypass_suspicious_attempt):
File "/home/pi/Projects/InstaPy/instapy/login_util.py", line 136, in login_user
"//select[@class='_fsoey']/option[text()='English']").click()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 293, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 752, in find_element
'value': value})['value']
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//select[@class='_fsoey']/option[text()='English']"}
(Session info: chrome=63.0.3239.84)
(Driver info: chromedriver=2.33 (undefined),platform=Linux 4.14.34-v7+ armv7l)

wontfix

All 15 comments

you need to download the updated master.zip if anymore problems, go to #2157

Can I get it with apt-get install master.zip?

Just tried it with the newest version of the master branch and it runs into the same error :(

Having this issue too.

Hi guys

_Try https://github.com/timgrossmann/InstaPy/issues/2133#issuecomment-394098747 and see if it works, if not, let us know._

Cheers

A part of the errors are not showing up yet.. But there are still some errors

Traceback (most recent call last):
File "quickstart.py", line 7, in
from instapy import InstaPy
File "/home/pi/Projects/InstaPy/instapy/__init__.py", line 2, in
from .instapy import InstaPy
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 32, in
from .login_util import login_user
File "/home/pi/Projects/InstaPy/instapy/login_util.py", line 147
sleep(1)
^
IndentationError: unindent does not match any outer indentation level

@AlanInsam
I think you have manually applied the fix.
The output above says that you have a wrong indentation at line 147 in login_util.py file.
To solve, either find and fix it or get full file from https://github.com/timgrossmann/InstaPy/issues/2133#issuecomment-394098747 and use it.

_If you can't find and fix it, share your login_util.py file, I will help_

@uluQulu I will try it tomorrow. How can I get the file via command line? Raspbian lite?

This error still there after #2133 -- I already had that file.
My login_util.py is the same as the comment.

I also did the changes made in the #2131.

File "quickstart.py", line 7, in
from instapy import InstaPy
File "/Users/Desktop/InstaPy-master/instapy/__init__.py", line 2, in
from .instapy import InstaPy
File "/Users/Desktop/InstaPy-master/instapy/instapy.py", line 22, in
from .comment_util import comment_image
File "/Users/Desktop/InstaPy-master/instapy/comment_util.py", line 5, in
from .util import update_activity
File "/Users/Desktop/InstaPy-master/instapy/util.py", line 201
total_posts = (browser.find_elements_by_xpath(
^
IndentationError: unindent does not match any outer indentation level

@AlainPilon
SSH it? But I can't be sure cos I have never used such device.

@claraabelha
You have an indentation error as console output points,

File "/Users/Desktop/InstaPy-master/instapy/util.py", line 201
total_posts = (browser.find_elements_by_xpath(
^
IndentationError: unindent does not match any outer indentation level

_open up util.py file and find that mistake near that line of 201 and fix it with correct indentation level_

Thanks for the help, @uluQulu, but saddly there's so many errors with my util.py. Hoping for an Instapy update with new files. :)

Getting this error after updating the points mentioned above, already installed all new one time, someone has an idea? And yes the newest chromedriver version is in the assets folder.

File "/root/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 177, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/root/venv/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/root/venv/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.39.562737 (dba483cee6a5f15e2e2d73df16968ab10b38a2bf),platform=Linux 2.6.32-openvz-042stab123.9-amd64 x86_64)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "customer6401_fanpage11.py", line 23, in
multi_logs=True, bypass_suspicious_attempt=True)
File "/root/fanpage11/instapy/instapy.py", line 170, in __init__
self.set_selenium_local_session()
File "/root/fanpage11/instapy/instapy.py", line 280, in set_selenium_local_session
Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at /root/fanpage11/assets/chromedriver

@claraabelha
Attach that problematic file in a zip, I will help.

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

v77v picture v77v  路  3Comments

deronsizemore picture deronsizemore  路  3Comments

ingorichter picture ingorichter  路  3Comments

ghost picture ghost  路  3Comments

CodeMaster1 picture CodeMaster1  路  3Comments