Tripalink
New Contributor III

Here is the solution that I discovered:

s = Service(chromedriver_path)

and at the end of the notebook I run:

driver.quit()

and I got rid of driver.stop_client(), driver.close(), and s.stop()

The driver.quit() closes all chrome windows and stops the driver and allows me to run the script again without having to restart the cluster.