Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service chromedriver unexpectedly exited. Status code was: -9

I am having so many problems with the webdriver for webscraping with selemium. The chromedriver is already installed and placed in the same folder as python file. All the suggestions that seem to load the the jupyter cell for few seconds are rejected after to this following message: chromedriver cannot opened because the developer cannot be verififed where I used homebrew to download them. Here my code:

from bs4 import BeautifulSoup as soup
import pandas as pd
from selenium import webdriver

my_url='google.com'
driver= webdriver.Chrome()

I am now trying to solve this problem by downloading chromium but I have that status code was 9 error and that pop up telling me that my code cannot be trusted.

like image 432
Camue Avatar asked Aug 31 '25 20:08

Camue


2 Answers

xattr -d com.apple.quarantine /usr/local/bin/chromedriver

/usr/local/bin/chromedriver replace with actual path

like image 122
PDHide Avatar answered Sep 04 '25 01:09

PDHide


While using selenium's webdriver-manager, we had this same error from this line

driver = webdriver.Chrome(ChromeDriverManager().install())

To fix it, we opened a chrome window -> settings -> about chrome -> update chrome. Or chrome://settings/help on your browser.

After it finished building the new version of chrome, that same line no longer generates the error.

Of course, this only worked since Google had pushed a new version of chrome with a bugfix for whatever was causing that.

like image 31
Shili Ho Avatar answered Sep 04 '25 01:09

Shili Ho