0

You are about to run the chrome-webdriver on an azure cloud service.

However, the following error occurs.

chrome_webdriver sample code

from selenium import webdriver 
driver = webdriver.Chrome('/.chromedriver.exe') 
url = "https://www.instagram.com/" 
driver.get(url) 

enter image description here

  • If you look at the picture, I put the chrome-driver file in the same directory as .ipynb
  • The path was set to './chromedriver.exe', but an error occurred.

Other attempted methods

1. driver = webdriver.Chrome(r"\chromedriver.exe")
2. driver = webdriver.Chrome("\\chromedriver.exe")
3. driver = webdriver.Chrome("/chromedriver.exe")

-> I tried a different method, but an error occurred.

how to chrome-webdriver excute in azure cloud service?

Vova Bilyachat Update posts for comments

1. driver = webdriver.Chrome('./Users/admin/chromedriver.exe')
-> Message: 'chromedriver.exe' executable needs to be in PATH.
2. driver = webdriver.Chrome('./chromedriver.exe')
-> OSError: [Errno 8] Exec format error: './chromedriver.exe'

update post2 enter image description here

d219
  • 2,707
  • 5
  • 31
  • 36
elk_basic
  • 153
  • 2
  • 2
  • 9

1 Answers1

0

I think your error is that you set path "/chromedriver.exe" which is looking for file in root folder, change it to "./chromedriver.exe" where "./" means start from folder you execute script

Also you must be sure that you deployed right driver for right Operating System

And since its linux use

driver = webdriver.Chrome('/.chromedriver') 
Vova Bilyachat
  • 18,765
  • 4
  • 55
  • 80