0

My code worked fine until a few days ago. But now I'm facing an error as follows:

Fatal Python error: Cannot recover from stack overflow

with the minimal code:

my code

Error:

errors screen

What's the cause of the sudden errors?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

This error message...

Cannot recover from stack overflow

...indicates that ChromeDriverManager is initiating multiple threads while trying to download the ChromeDriver and is reaching the limit of the interpreter stack during that infinite recursive loop.


This usecase

I don't see any significant error in your code block as I was able to execute similar lines of code on my box perfecto:

  • Code block:

    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options
    from selenium.webdriver.chrome.service import Service as ChromeService
    from webdriver_manager.chrome import ChromeDriverManager
    
    options = Options()
    options.add_argument("start-maximized")
    driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=options)
    driver.get('https://pypi.org/')
    
  • Console output:

    ====== WebDriver manager ======
    Current google-chrome version is 110.0.5481
    Get LATEST chromedriver version for 110.0.5481 google-chrome
    Trying to download new driver from https://chromedriver.storage.googleapis.com/110.0.5481.77/chromedriver_win32.zip
    Driver has been saved in cache [C:\Users\debanjan.bhattacharj\.wdm\drivers\chromedriver\win32\110.0.5481.77]
    

Solution

As a preventive measure you can:


References

A few helpful documentations:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352