python - 无法从节点连接读取描述符:连接到系统的设备未运行。(0x1F) 尝试使用 Python 执行 Selenium 时
问题描述
我正在执行一个非常简单的 selenium 调用:
from selenium import webdriver
driver_path = r"C:\Windows\chromedriver.exe"
url = "http://www.google.com"
driver = webdriver.Chrome(driver_path)
driver.get(url)
尽管浏览器打开并导航到该位置,但我收到了一个非常奇怪的错误:
[9232:7300:1130/164722.426:ERROR:device_event_log_impl.cc(211)] [16:47:22.426] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
我以前没有遇到过这种情况,它实际上是从今天开始发生的。我有一个很好的浏览试图找到一个解决方案,但我发现最接近的是这个答案:Failed to read descriptor from node connection: A device attach to the system is not functional error using ChromeDriver Chrome through Selenium
但它只是说它可以被忽略,这不是最好的选择..
该错误会控制控制台,直到您按 Enter 键,因此,如果在 python 脚本之后调用了其他任何内容,它就会挂起。
有没有人知道为什么会突然发生这种情况?
解决方案
推荐阅读
- javascript - 从下拉项中传递值
- c# - 如何删除实体框架中的多个级联路径
- asp.net-identity - Blazor WebAssembly 中定义的登录页面在哪里?
- python - 遍历列表并在 Python 中找到匹配项
- tensorflow - Keras 检查点未保存到谷歌云存储桶
- hsqldb - 升级后 HSQLDB 命令行关闭不再起作用
- javascript - 在反应中更改循环内的especify css元素
- flutter - 在 Flutter 中将带有图像的对象本地存储在磁盘上的最佳方法?
- r - 如何通过 R 中的 dplyr 逐行选择 tibble 中的随机元素?
- java - Unicode ICU 而不是 java.time.DateTimeFormatter 应该用于国际日期和时间