Hello i updated the new files but i have this error
While running with Python3 quickstart.py
Traceback (most recent call last):
File "/Users/Edhim/Desktop/INSTAPY/LM/quickstart.py", line 5, in
from selenium.common.exceptions import NoSuchElementException
ModuleNotFoundError: No module named 'selenium'
while runnin with python quickstart.py
Traceback (most recent call last):
File "/Users/Edhim/Desktop/INSTAPY/LM/quickstart.py", line 7, in
from instapy import InstaPy
File "/Users/Edhim/Desktop/INSTAPY/LM/instapy/__init__.py", line 2, in
from .instapy import InstaPy
File "/Users/Edhim/Desktop/INSTAPY/LM/instapy/instapy.py", line 23, in
from .comment_util import comment_image
File "/Users/Edhim/Desktop/INSTAPY/LM/instapy/comment_util.py", line 7, in
from .util import update_activity
File "/Users/Edhim/Desktop/INSTAPY/LM/instapy/util.py", line 20, in
from .quota_supervisor import quota_supervisor
File "/Users/Edhim/Desktop/INSTAPY/LM/instapy/quota_supervisor.py", line 7, in
from plyer import notification
ImportError: No module named plyer
Any idea please ?
@uluQulu
Many thanks.
@Edhim Every time you encounter something that reads No module named 'xyz'
simply do a pip install xyz
where xyz is the name of the missing module.
Seems like you forgot to do pip install .
in the beginning
Thank you @timgrossmann
I've made pip install plyer
but still have the same error - "ImportError: No module named 'plyer'
"
UPD. pip3 install plyer
is working
Hello!
I try sudo pip install requests
But I did not succeed.
Server: DigitalOcean - Ubuntu
I used all the commands in the tutorial ubuntu(I deleted droplets 2x)
File "quickstart.py", line 3, in
from instapy import InstaPy
File "/root/InstaPy/instapy/init.py", line 2, in
from .instapy import InstaPy
File "/root/InstaPy/instapy/instapy.py", line 12, in
import requests
ImportError: No module named requests
root@instapy:~# sudo pip install requests
Requirement already satisfied: requests in /usr/local/lib/python3.5/dist-packages (2.20.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.5/dist-packages (from requests) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.5/dist-packages (from requests) (2018.10.15)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.5/dist-packages (from requests) (1.24)
Requirement already satisfied: idna<2.8,>=2.5 in /usr/local/lib/python3.5/dist-packages (from requests) (2.7)
same on raspberry
@guilhermelucasfreitas @escariao
While installing some package using pip
MAKE SURE you are targeting the right python version.
_E.g. you might have installed several python(s) on your system and pip
command might install packages for python 2
and pip3
command for python 3
, etc._.
It is the common case of mistakes for many people.
thank you @uluQulu
i try, but doesnt work...
Welcome @escariao
Explain in details what you have done and what does not work.
pi@raspberrypi:~/Projects/InstaPy $ python3 quickstart.py
ERROR [2018-10-30 11:32:02] [delaredior] Message: unknown error: Chrome failed to start: exited abnormally
(chrome not reachable)
(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.40,platform=Linux 4.14.71-v7+ armv7l)
Traceback (most recent call last):
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 350, in set_selenium_local_session
chrome_options=chrome_options)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(chrome not reachable)
(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.40,platform=Linux 4.14.71-v7+ armv7l)
ERROR:delaredior:Message: unknown error: Chrome failed to start: exited abnormally
(chrome not reachable)
(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.40,platform=Linux 4.14.71-v7+ armv7l)
Traceback (most recent call last):
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 350, in set_selenium_local_session
chrome_options=chrome_options)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(chrome not reachable)
(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.40,platform=Linux 4.14.71-v7+ armv7l)
Traceback (most recent call last):
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 350, in set_selenium_local_session
chrome_options=chrome_options)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(chrome not reachable)
(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.40,platform=Linux 4.14.71-v7+ armv7l)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "quickstart.py", line 16, in
headless_browser=False)
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 230, in __init__
self.set_selenium_local_session()
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 354, in set_selenium_local_session
Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at /home/pi/Projects/InstaPy/assets/chromedriver
pi@raspberrypi:~/Projects/InstaPy $ ls -l assets/
total 6816
-rw-r--r-- 1 pi pi 1003 out 30 01:51 business_categories.md
-rwxr-xr-x 1 root root 6975260 set 13 21:48 chromedriver
pi@raspberrypi:~/Projects/InstaPy $
Well, you are having a different problem than the users above.
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(chrome not reachable)
(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Out of that output, I can say that you are having problems with either webdriver or its web browser.
What you can do?
Not all versions [esp. the latest versions] of chromedriver & Chrome web browser work well on Raspberry devices.
_There are people who shared a post explaining a good combo of those for Raspberry devices. You can find it if searches the Issues_.
If you get some different results, just post it here to inspect.
And if trying different versions does not help, let us now.
Yes, i try diferent versions (https://chromedriver.storage.googleapis.com/index.html)
and i get this:
pi@raspberrypi:~/Projects $ python3 InstaPy/quickstart.py
Traceback (most recent call last):
File "InstaPy/quickstart.py", line 16, in <module>
headless_browser=False)
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 230, in __init__
self.set_selenium_local_session()
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 350, in set_selenium_local_session
chrome_options=chrome_options)
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/home/pi/.local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
pi@raspberrypi:~/Projects $
Hi, my friends!!!
I downloaded all versions(https://chromedriver.storage.googleapis.com/index.html), there are only two errors that appear. Which are exactly those two above I posted before.
Just to remember:
instapy.instapy.InstaPyError: ensure chromedriver is installed at /home/pi/Projects/InstaPy/assets/chromedriver
or
OSError: [Errno 8] Exec format error
Yes, @uluQulu! I try all versions combo Chromium + chromedrive. And nothing ;(
I have raspberry pi 3 with raspbian (Linux raspberrypi 4.14.71-v7+ #1145 armv7l )
I'm thinking of returning my raspberry rsrs ;~(
@escariao
Have a read https://github.com/timgrossmann/InstaPy/issues/3213#issuecomment-432838033.
It may help.
Thanks, but i had already seen.
Follows the installation of the normal guide. [Installation with raspbian stretch lite (v4.14)]
But it does not work, so then they try:
sudo pip install future
sudo apt-get install xvfb
sudo pip install pyvirtualdisplay
sudo reboot (may not be required, but no harm)
sudo xvfb-run python quickstart.py -> gave me an error with chrome browser so i used
xvfb-run python quickstart.py and it seems to work for now
It does not work. So it comes to an end, which is a link to this one. ;~(
I try all this, friend
I see, @escariao.
There @GabrieleCalarota used a different method to get chromedriver.
from https://github.com/electron/electron/releases/download/v3.0.0-beta.5/chromedriver-v3.0.0-beta.5-linux-armv7l.zip
that I thought might help..
Your problem is really basic and is an installation issue in a Raspberry but I really have no any experience in it to offer you a further help, but if you ask other Raspberry users they would help.
Yes, It's the same as I got.
Thank you, my friend @uluQulu. I'm almost giving up rs
@uluQulu my friend!!! The problem was because i had two chromium browsers install! I executed
sudo apt-get remove chromium
After that i could execute python quickstart.py without problem!
Sorry, and thank you!!!
Good to hear it, @escariao 馃檪
I tried to install the request with pip3 but I did not succeed
sudo apt-get install python3-pip
pip3 install requests
Most helpful comment
@Edhim Every time you encounter something that reads
No module named 'xyz'
simply do apip install xyz
where xyz is the name of the missing module.Seems like you forgot to do
pip install .
in the beginning