The script runs on the local machine on Python, on linux VDS refuses to see chromedriver .
xvfb installed, selenium installed, Python2.7 is installed, the path to the chrome driver is specified.
The code is:
from selenium import webdriver driver = webdriver.Chrome('/home/selenium/Drivers/chromedriver') driver.get('https://google.com') ff = open("file.txt", "w") ff.write(driver.page_source.encode("utf-8")) ff.close() driver.close() Before sending, I change the line from the path to the chrome driver as on the server:
from selenium import webdriver #driver = webdriver.Chrome('/home/Selenium/Drivers/chromedriver') driver = webdriver.Chrome('/home/chromedriver') driver.get('https://google.com') ff = open("file.txt", "w") ff.write(driver.page_source.encode("utf-8")) ff.close() driver.close() I send it to the server. Chromedriver is really on the path indicated by me:
root@70678:/home# ls chromedriver I run the script and get:
File "start.py", line 6, in <module> driver = webdriver.Chrome('/home/chromedriver') File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__ self.service.start() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 96, in start self.assert_process_still_running() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 109, in assert_process_still_running % (self.path, return_code) selenium.common.exceptions.WebDriverException: Message: Service /home/chromedriver unexpectedly exited. Status code was: 127 Please tell me what it means, and what could be the reason?