.exceptions.WebDriverException: Message: Can not connect to the Service

2024/11/17 0:37:00

struggling to find a solution all over, have latest chrome 117 and also downloaded chromedriver and used the path accordingly in script also tried with chrome browser

Although it opens the browser but does not opens the desired test url (cnn.com) browser opens and eventually fails with the error:

selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service C:\\xx\\x\\x\\chrome-win64\\chrome-win64\\chrome.exe

what can i try to browser starts opening urls, also tried disabling firewall but no luck

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Serviceservice_obj = Service(r"C:\\xx\\xx\\xx\\chrome-win64\\chrome-win64\\chrome.exe")driver.get("https://www.cnn.com/")

what can i try to open desired urls, also tried disabling firewall but no luck host file

# 102.54.94.97     rhino.acme.com          # source server
# 38.25.63.10     x.acme.com              # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1       localhost
#::1             localhost
Answer

Please use these below lines of code, to come out of the latest Chrome issue.

 options = Options()options.add_argument("--remote-allow-origins=*")driver = webdriver.Chrome(options=options)
https://en.xdnf.cn/q/119133.html

Related Q&A

How to call a previous function in a new function? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.This question does not appear to be about programming within the scope defined in the help center.Cl…

Using simpleauth to login in with GAE

This question is in the reference of this. As suggested I am using simpleauth to login via linkedin. Now I am having trouble with the redirect_uri. I have successfully deployed dev_appserver.py example…

How do i force my code to print in python

Im having trouble trying to work out an error in my code. It isnt printing the final product and leaving a blank space.playing = True string = "" Alphabet = (z,a,b, c, d, e, f, g, h, i, j, k,…

Adding specific days in python table

I have a dataset (Product_ID,date_time, Sold) which has products sold on various dates. The dates are not consistent and are given for 9 months with random 13 days or more from a month. I have to segre…

django how to following relationships backwards?

I am having some issue with following relationships backwards. From the parent page i want to be able to see what children belong to that parent. Heres what i got so farmodel.pyclass Parents(models.Mod…

Python File handling: Seaching for specific numbers

Im creating a document in which I need to record license plates of vehicles (its a practice exercise, nothing illegal) and calculate the speed they travel at and display all the vehicles that are trave…

How to convert token list into wordnet lemma list using nltk?

I have a list of tokens extracted out of a pdf source. I am able to pre process the text and tokenize it but I want to loop through the tokens and convert each token in the list to its lemma in the wor…

Script throws an error when it is made to run using multiprocessing

Ive written a script in python in combination with BeautifulSoup to extract the title of books which get populated upon providing some ISBN numbers in amazon search box. Im providing those ISBN numbers…

Efficiently pair random elements of list

I have a list of n elements say: foo = [a, b, c, d, e] I would like to randomly pair elements of this list to receive for example: bar = [[a, c], [b, e]] where the last element will be discarded if the…

ALL permutations of a list with repetition but not doubles

I have seen similar but not the same: here. I definitely want the permutations, not combinations, of all list elements. Mine is different because itertools permutation of a,b,c returns abc but not aba …