0

I am a beginner on web automation and was trying to automate my chrome web driver to open youtube...I am using selenium and my code is supposed to work just fine...here is the code

from selenium import webdriver
path="C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(path)
driver.get("https://www.youtube.com")

When I run this code it shows me a messagebox that says:"Failed to load extensions from C:\Users\user\AppData\Local\Temp\scoped_dir8792_19363 3017\internal.Manifest file is missing or unreadable."

Each time I run the code and this messagebox appears,it keeps generating these scope folders on my "C:\Users\user\AppData\Local\Temp" path...the folders may look like:"scoped_dir8792_193633017", "scoped_dir9868_16694704","scoped_dir10496_773041025".

After quitting the messagebox the chrome driver opens and display the good old "Aw snap" error... and after quitting the chrome webdriver the following exception is raised...

  File "C:/Users/user/Desktop/Anobot.py/project2.py", line 3, in <module>
    driver = webdriver.Chrome(path)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited normally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

And yes...I have also checked for malware in my device but there were none.

Anozatix
  • 1
  • 1

0 Answers0