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?

4
  • 1
    Can you add the full code in textual format ? Commented Feb 27, 2023 at 10:31
  • and if it worked, we will need your actual code, not web driver settings, because the error is about stackoverflow. Commented Feb 27, 2023 at 10:43
  • Please provide enough code so others can better understand or reproduce the problem. Commented Feb 27, 2023 at 11:24
  • Update the question with your code trials and text based complete error stacktrace. Commented Feb 27, 2023 at 13:08

1 Answer 1

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:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.