[Python] Selenium ConnectionResetError: [WinError 10054] An existing connection was forcibly...

Discussão em 'Python' iniciado por Stack, Julho 17, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to make a program using selenium to refresh the page after it has loaded, and do this indefinitely. (i havent used it before) Here is my code:

    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options
    from time import sleep as s

    options = Options()
    options.binary_location = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
    driver = webdriver.Chrome(chrome_options = options, executable_path=r'chromedriver.exe')
    while True:
    driver.get('https://advertropolis.g1gabytedev.repl.co/jumbo.php')
    s(3)
    driver.close()


    And here is the error: ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

    I tried changing my browser version to the one adjacent to the driver (111) but it still gives me the same error. I need help lol.

    Continue reading...

Compartilhe esta Página