Error Messages: selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn’t exist
Traceback (most recent call last):
File "/opt/Vcert/myVcert/vul.py", line 2, in <module>
from selenium import webdriver
ImportError: No module named selenium
Traceback (most recent call last):
File "/opt/Vcert/myVcert/vul.py", line 228, in <module>
main()
File "/opt/Vcert/myVcert/vul.py", line 44, in main
browser = my_browser()
File "/opt/Vcert/myVcert/vul.py", line 31, in my_browser
browser = webdriver.Chrome(executable_path='/opt/bin/chromedriver', chrome_options=chrome_options)
File "/opt/py3/lib64/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/opt/py3/lib64/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/opt/py3/lib64/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/opt/py3/lib64/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/opt/py3/lib64/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
Solution:
1. Kill chromedriver, kill webdriver, kill chrome.
2. Add browser.close() after each browser.
Read More:
- [Solved] Selenium.common.exceptions.WebDriverException: Message: newSession
- [Solved] selenium.common.exceptions.JavascriptException: Message: javascript error: windows is not defined
- Chromdriver Install error: File “C:\python37\lib\site-packages\selenium\webdriver\common\service.py”, line 76, in start stdin=PIPE) File…
- [Solved] deepin python Message: unknown error: cannot find Chrome binary
- Python Selenium Common Keyboard Controls
- [Solved] Selenium Error: ERROR: Message: element not interactable
- [Solved] AttributeError: module ‘selenium.webdriver‘ has no attribute ‘Chrome‘
- [Solved] Python Selenium Error: AttributeError: ‘WebDriver‘ object has no attribute ‘find_element_by_xpath‘
- Python+Selenium Error: AttributeError: ‘WebDriver‘ NameError: name ‘By‘ is not defined
- [Solved] unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.36.540471
- [Solved] Selenium python send_key error: list object has no attribute
- [Python] Right-click Selenium to Save the picture error: attributeerror: solution to module ‘pyscreen’ has no attribute ‘locationonwindow’
- [Solved] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclie
- [Solved] selenium Error: ERROR:ssl_client_socket_impl.cc(962)] handshake failed; returned -1, SSL
- [Solved] mmdetection benchmark.py Error: RuntimeError: Distributed package doesn‘t have NCCL built in
- [Solved] Python Project Error: django.core.exceptions.ImproperlyConfigured: WSGI application ‘WebTool.wsgi.application
- [Solved] socketio.exceptions.ConnectionError: OPEN packet not returned by server
- [Solved] with ERRTYPE = cudaError CUDA failure 999 unknown error
- Mac Selenium Use Error: Can not connect to the Service chromedriver
- [Solved] Python-selenium locates an element cannot be clicked error: ElementClickInterceptedException