message: session not created: chrome failed to start: exited normally. (session not created: devtoolsactiveport file doesn't exist) (the process started from chrome location /usr/bin/google-chrome is no longer running, so chromedriver is assuming that怎么处理


这个问题是由于Chrome浏览器没有正确启动导致的。你可以尝试以下方法来解决这个问题: 1. 确保你的Chrome浏览器已经安装在默认路径(通常是`/usr/bin/google-chrome`)。如果不是,请修改代码中的Chrome驱动程序路径以匹配实际安装路径。 2. 检查是否有多个Chrome浏览器实例在运行。如果有,请关闭其他实例,只保留一个。 3. 尝试更新Chrome浏览器和Chrome驱动程序到最新版本。 4. 如果问题仍然存在,可以尝试使用无头模式运行Chrome浏览器。在创建WebDriver对象时,添加以下选项: ```python from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_argument("--headless") driver = webdriver.Chrome(executable_path='/path/to/chromedriver', options=chrome_options) ``` 将`/path/to/chromedriver`替换为你的Chrome驱动程序的实际路径。 [2024-07-02 17:22:16 | AI写代码神器 | 222点数解答]
相关提问
- message: session not created: chrome failed to start: exited normally. (session not created: devtoolsactiveport file doesn't exist) (the process started from chrome location /usr/bin/google-chrome is no longer running, so chromedriver is assuming that怎么处理(222点数解答 | 2024-07-02 17:22:16)242
- (session not created: devtoolsactiveport file doesn't exist) 16:47:03 (the process started from chrome location /usr/bin/google-chrome is no longer running, so chromedriver is assuming that chrome has crashed.)(388点数解答 | 2024-07-02 16:52:01)251
- (session not created: devtoolsactiveport file doesn't exist) 16:47:03 (the process started from chrome location /usr/bin/google-chrome is no longer running, so chromedriver is assuming that chrome has crashed.)怎么处理(398点数解答 | 2024-07-02 16:52:25)262
- (session not created: devtoolsactiveport file doesn't exist) 16:47:03 (the process started from chrome location /usr/bin/google-chrome is no longer running, so chromedriver is assuming that chrome has crashed.)怎么处理(566点数解答 | 2024-07-02 16:53:50)186
- the process started from chrome location /usr/bin/google-chrome is no longer running, so chromedriver is assuming that chrome has crashed.(134点数解答 | 2024-07-02 17:37:08)193
- the process started from chrome location /usr/bin/google-chrome is no longer running, so chromedriver is assuming that chrome has crashed.(413点数解答 | 2024-07-02 17:37:25)207
- 最后一次提交时间:2025-07-10 21:24:47 得分:0.00 WA e01.c: Wrong e02.c: Error: Invalid variable name '_' Error: Undeclared variable '_' /usr/bin/ld: /tmp/cc6l5bH4.o: in function `main': (.text+0x3b): undefined reference to `_ANJDFnjkl_jnnjk121212' /usr/bin/ld: (.text+0x49): undefined reference to `_ANJDFnjkl_jnnjk121212' /usr/bin/ld: (.text+0x57): undefined reference to `_ANJDFnjkl_jnnjk121212' /usr/bin/ld: (.text+0x66): undefined reference to `_ANJDFnjkl_jnnjk121212' collect2: error: ld returned 1 exit (857点数解答 | 2025-07-10 21:26:21)112
- def find_indices(text, query): # 将文本转换为小写,以实现不区分大小写的搜索 text_lower = text.lower() query_lower = query.lower() start = 0 # 初始化一个列表来存储查询内容的索引 indices = [] # 使用find方法来查找查询内容的索引 while true: start = text_lower.find(query_lower, start) if start == -1: break # 将索引添加到列表中,并更新搜索的起始位置 indices.append(start) start += 1 # 移动到找到的词的下一个字符,以避免重复计数 return indices # 文档内容 document = """ it is(231点数解答 | 2024-10-21 21:44:08)223
- w tensorflow/stream_executor/platform/default/dso_loader.cc:64] could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: no such file or directory 2024-03-01 14:19:13.225439: i tensorflow/stream_executor/cuda/cudart_stub.cc:29] ignore above cudart dlerror if you do not have a gpu set up on your machine.(337点数解答 | 2024-03-01 14:20:05)290
- w tensorflow/stream_executor/platform/default/dso_loader.cc:64] could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: no such file or directory 2024-03-01 14:19:13.225439: i tensorflow/stream_executor/cuda/cudart_stub.cc:29] ignore above cudart dlerror if you do not have a gpu set up on your machine.(347点数解答 | 2024-03-01 14:20:45)424
- w tensorflow/stream_executor/platform/default/dso_loader.cc:64] could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: no such file or directory(549点数解答 | 2024-03-11 17:53:15)356
- /usr/sbin/vsftpd: relocation error: /lib64/libnss_files.so.2: symbol __libc_readline_unlocked, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference 密码长度:8位(149点数解答 | 2025-01-20 11:15:28)139