auino / cookidump

Easily dump cookidoo recipes
MIT License
147 stars 34 forks source link

Error: executable_path has been deprecated #13

Closed NightProgramming closed 2 years ago

NightProgramming commented 2 years ago

It works with selenium 3. Maybe you can change the requirements.txt to

beautifulsoup4
selenium>=3.0,<4.0

Having followed the installation and usage guide it gives me:

[CD] Welcome to cookidump, starting things off...
[CD] Complete the website domain: https://cookidoo.<somedomain>
<somepath>\cookidump.py:31: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
  driver = webdriver.Chrome(executable_path=chrome_driver_path, options=chrome_options)
Traceback (most recent call last):
  File "<somepath>\cookidump.py", line 237, in <module>
    run(args.webdriverfile, args.outputdir, args.separate_json)
  File "<somepath>\cookidump.py", line 94, in run
    brw = startBrowser(webdriverfile)
  File "<somepath>\cookidump.py", line 31, in startBrowser
    driver = webdriver.Chrome(executable_path=chrome_driver_path, options=chrome_options)
  File "<somepath>\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in __init__
    super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
  File "<somepath>\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 93, in __init__
    RemoteWebDriver.__init__(
  File "<somepath>\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 269, in __init__
    self.start_session(capabilities, browser_profile)
  File "<somepath>\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 360, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "<somepath>\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 425, in execute
    self.error_handler.check_response(response)
  File "<somepath>\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location <somepath>\AppData\Local\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
Backtrace:
        Ordinal0 [0x00D47413+2389011]
        Ordinal0 [0x00CD9F61+1941345]
        Ordinal0 [0x00BCC658+837208]
        Ordinal0 [0x00BE9854+956500]
        Ordinal0 [0x00BE5C51+941137]
        Ordinal0 [0x00C18C80+1150080]
        Ordinal0 [0x00C188DA+1149146]
        Ordinal0 [0x00C13F66+1130342]
        Ordinal0 [0x00BEE546+976198]
        Ordinal0 [0x00BEF456+980054]
        GetHandleVerifier [0x00EF9632+1727522]
        GetHandleVerifier [0x00FABA4D+2457661]
        GetHandleVerifier [0x00DDEB81+569713]
        GetHandleVerifier [0x00DDDD76+566118]
        Ordinal0 [0x00CE0B2B+1968939]
        Ordinal0 [0x00CE5988+1989000]
        Ordinal0 [0x00CE5A75+1989237]
        Ordinal0 [0x00CEECB1+2026673]
        BaseThreadInitThunk [0x7707FA29+25]
        RtlGetAppContainerNamedObjectPath [0x773A7A7E+286]
        RtlGetAppContainerNamedObjectPath [0x773A7A4E+238]

No Python, Pip, Python Packages, Chrome, Chrome WebDriver were installed before (everything was fresh for trying out cookidump).

chromedriver version is ChromeDriver 100.0.4896.60 (stable) Python version is 3.10.4 (stable) selenium is 4.1.3 beautifulsoup4 is 4.11.1 OS is Windows 10

auino commented 2 years ago

Thank you, just updated the requirements.txt file (you'll also find a thank in the project readme file).