I\'ve looked around checked both documentations and have found no answer.
I\'ve been trying to use InstaPy a instagram api for python. After failing with multiple er
had same issue in django.
However when I ran the same code locally (not activating my django app) it was fine and didn't have to explicitly define the path to the chrome driver.
Got around it by explicitly defining the path and the chromederiver.exe
similar to the answer above. path = "C:/Users/YOUR_USER/Desktop/chromedriver/chromedriver.exe"
in my case, since I want to eventually post my app I used dynamic paths
ie.
import os
BASE_oaAPP_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_oaAPP_Utilities_DIR = os.path.join(BASE_oaAPP_DIR, 'mySubFolderInTheApp')
def utilsPathFileName(fileName):
return os.path.join(BASE_oaAPP_Utilities_DIR, fileName)
chrome_path = utilsPathFileName('chromedriver.exe')
driver = webdriver.Chrome(chrome_path)