Answer the question
In order to leave comments, you need to log in
Selenium Error while loading page?
My code is uploaded to the pythonanywhere service
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
def start():
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument('srtart_maximized')
driver=webdriver.Chrome(options=chrome_options)
URL='***'
driver.get(URL)
#some code
driver.quit()
while True:
try:
start()
print('stop')
except Exception as x:
print(repr(x))
print('stop')
time.sleep(60)
WebDriverException('invalid session id\n (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1029-aws x86_64)',
None, None)
Answer the question
In order to leave comments, you need to log in
Try the following
1. Check the version of chrome-driver, chromium, chromedriver; they must match
2. Run chromedriver in the console and see the output
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question