[PYTHON] 2 ways to deal with SessionNotCreatedException

Introduction

The method introduced in the application creation article (Taro-kun who presses the attendance button instead of you) is cut out and introduced separately. When using Selenium in Python, one day you suddenly get a SessionNotCreatedException.

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 76

What to do when this comes out.

If you are using a Chrome Driver that is not a version supported by Selenium

First, bring in a supported driver. ChromeDriver When you bring it, specify the location in the driver's executable_path at a suitable location in the project.

#Specify the version of chromedriver
driver = webdriver.Chrome(options=options, executable_path='chromedriver.exe location')

When the version of Chrome and the version of Chrome Driver are different

Check the version of Chrome browser you are using. Menu> Help> About Google Chrome After checking the version, get the same version of Chrome Driver and place it in a suitable place in the project. (For example, if the browser is 79.0.3945.130, DL ChromeDriver 79.0.3945.36) The rest is the same as ↑ and specify the location of the driver.

Summary

For now, either of these has been resolved, so please refer to it. I wonder if there is no other way than manually adjusting the version after the error occurs. ..

Recommended Posts

2 ways to deal with SessionNotCreatedException
4 ways to deal with missing dict keys
How to deal with SessionNotCreatedException when using Selenium
How to deal with imbalanced data
How to deal with imbalanced data
How to deal with DistributionNotFound errors
How to deal with enum compatibility errors
[Python] How to deal with module errors
Various ways to destroy resources with scope
How to deal with memory leaks in matplotlib.pyplot
How to deal with errors when hitting pip ②
can't pickle annoy. How to deal with Annoy objects
How to deal with run-time errors in subprocess.call
How to deal with module'tensorflow' has no attribute'〇〇'
Convert 202003 to 2020-03 with pandas
How to deal with Django's Template Does Not Exist
How to deal with pyenv initialization failure in fish 3.1.0
[Python] How to deal with pandas read_html read error
How to deal with Executing transaction: failed in Anaconda
Try to factorial with recursion
Connect to BigQuery with Python
Connect to Wikipedia with Python
Connect to Postgresql with GO
Introduction to RDB with sqlalchemy Ⅰ
Easy to make with syntax
How to update with SQLAlchemy?
To run gym_torcs with ubutnu16
How to cast with Theano
[Linux] How to deal with garbled characters when viewing files
[AWS] How to deal with "Invalid codepoint" error in CloudSearch
A story about how to deal with the CORS problem
How to Alter with SQLAlchemy?
Switch python to 2.7 with alternatives
Write to csv with Python
For beginners, how to deal with common errors in keras
How to separate strings with','
How to RDP with Fedora31
How to deal with UnicodeDecodeError when executing google image download
How to Delete with SQLAlchemy?
How to deal with "You have multiple authentication backends configured ..." (Django)
How to deal with errors when installing whitenoise and deploying to Heroku
How to deal with errors when installing Python and pip with choco
Convert .ipynb to .html (with BatchFile)
Steps to develop Django with VSCode
Python: How to use async with
Link to get started with python
Add fields to features with ArcPy
Connect to multiple databases with SQLAlchemy
[Python] Write to csv file with Python
What to do with Magics install
Create folders from '01' to '12' with python
Nice to meet you with python
Try to operate Facebook with Python
Output to csv file with Python
How to use virtualenv with PowerShell
How to install python-pip with ubuntu20.04LTS
Common html to rent with Django
Stream videos to Chromecast with Gravio
Try to profile with ONNX Runtime
Output cell to file with Colaboratory
Giving idempotence to fabric with cuisine