Python - selenium.common.exceptions.WebDriverException: Message: newSession
Hi,
on a Linux server I have a python script that runs with selenium + geckodriver on firefox. Everything went ok for several months and now I have a mistake:
selenium.common.exceptions.WebDriverException: Message: newSession
Can someone advise you what to do?
Thank you
WHOLE ERROR:
------------------------------------------
Hi,
to fix error selenium.common.exceptions.WebDriverException: Message: newSession bugs, be sure to upgrade selenium + geckodriver to help:
#upgrade selenium
#upgrade webdriver
- Download from https://github.com/mozilla/geckodriver/releases
mv: overwrite ‘/usr/bin/geckodriver’?
on a Linux server I have a python script that runs with selenium + geckodriver on firefox. Everything went ok for several months and now I have a mistake:
selenium.common.exceptions.WebDriverException: Message: newSession
Can someone advise you what to do?
Thank you
WHOLE ERROR:
------------------------------------------
Traceback (most recent call last):
File "/var/script/script.py", line 573, in
driver = webdriver.Firefox(ff_profile)
File "/usr/lib/python3.4/site-packages/selenium/webdriver/firefox/webdriver.py", line 158, in __init__
keep_alive=True)
File "/usr/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/lib/python3.4/site-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: newSession
REPLY
Hi,
to fix error selenium.common.exceptions.WebDriverException: Message: newSession bugs, be sure to upgrade selenium + geckodriver to help:
#upgrade selenium
pip3 install --upgrade selenium
#upgrade webdriver
- Download from https://github.com/mozilla/geckodriver/releases
tar xzf geckodriver-v0.26.0-linux64.tar.gz
mv geckodriver /usr/bin/
mv: overwrite ‘/usr/bin/geckodriver’?
y