Traceback (most recent call last): File "D:\pythonsthl\flaskProject\SeleniumTest\21Test.py", line 19, in <module> driver = webdriver.Chrome(options=options) File "D:\pythonsthl\flaskProject\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 49, in __init__ super().__init__( File "D:\pythonsthl\flaskProject\venv\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 54, in __init__ super().__init__( File "D:\pythonsthl\flaskProject\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in __init__ self.start_session(capabilities) File "D:\pythonsthl\flaskProject\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 291, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] File "D:\pythonsthl\flaskProject\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute self.error_handler.check_response(response) File "D:\pythonsthl\flaskProject\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: was killed. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location C:\\Users\\24972\\Downloads\\chromedriver_win32\\chromedriver.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: Backtrace: GetHandleVerifier [0x00D8A813+48355] (No symbol) [0x00D1C4B1] (No symbol) [0x00C25358] (No symbol) [0x00C43621] (No symbol) [0x00C40579] (No symbol) [0x00C70C55] (No symbol) [0x00C7093C] (No symbol) [0x00C6A536] (No symbol) [0x00C482DC] (No symbol) [0x00C493DD] GetHandleVerifier [0x00FEAABD+2539405] GetHandleVerifier [0x0102A78F+2800735] GetHandleVerifier [0x0102456C+2775612] GetHandleVerifier [0x00E151E0+616112] (No symbol) [0x00D25F8C] (No symbol) [0x00D22328] (No symbol) [0x00D2240B] (No symbol) [0x00D14FF7] BaseThreadInitThunk [0x75A77D59+25] RtlInitializeExceptionChain [0x76EDB79B+107] RtlClearBits [0x76EDB71F+191] Process finished with exit code 1
时间: 2023-08-02 16:04:49 浏览: 415
C#ASP.NET网络进销存管理系统源码数据库 SQL2008源码类型 WebForm
这个错误是由于Chrome浏览器无法启动导致的。根据错误信息,Chrome浏览器启动失败并被终止。
这个问题可能有多种原因,其中之一可能是Chrome浏览器与ChromeDriver的版本不兼容。请确保你使用的ChromeDriver版本与你安装的Chrome浏览器版本匹配。
另外一个可能的原因是Chrome浏览器无法正常启动。你可以尝试手动启动Chrome浏览器,看看是否有任何错误提示或弹窗。如果有,请根据错误提示解决问题。
此外,还有一些其他可能的解决方法:
1. 更新Chrome浏览器和ChromeDriver到最新版本。
2. 检查你的操作系统和ChromeDriver之间的兼容性。
3. 确保你的代码中没有其他与Chrome浏览器或ChromeDriver冲突的设置。
4. 尝试在不同的环境中运行代码,例如在不同的操作系统或虚拟环境中。
如果你尝试了以上方法仍然无法解决问题,请提供更多的错误信息和相关代码,以便我能够更好地帮助你解决问题。
阅读全文