我们最近使用 ChromeDriver v87.0.4280.20 和 Chrome v87.0.4280.66(官方构建)(64 位)升级了我们的 Windows 10 测试环境,升级后,即使是最小的程序也会产生这个错误日志:
[9848:10684:1201/013233.169:ERROR:device_event_log_impl.cc(211)] [01:32:33.170] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
最小代码块:from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
driver = webdriver.Chrome(options=options, executable_path=r'C:\WebDrivers\chromedriver.exe')
driver.get('https://www.google.com/')
控制台输出:DevTools listening on ws://127.0.0.1:64170/devtools/browser/2fb4bb93-79ab-4131-9e4a-3b65c08dbffb
[9848:10684:1201/013233.169:ERROR:device_event_log_impl.cc(211)] [01:32:33.170] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[9848:10684:1201/013233.172:ERROR:device_event_log_impl.cc(211)] [01:32:33.173] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
有人面临同样的情况吗? ChromeDriver/Chrome v87 相对于 ChromeDriver/Chrome v86 是否有任何变化?有什么线索吗?
最佳答案
对于日志垃圾邮件,我深表歉意。如果您在使用 WebUSB 连接到设备时没有遇到问题,您可以忽略这些警告。它们由 Chrome 尝试读取当前暂停的 USB 设备的属性触发。
关于python - USB : usb_device_handle_win. cc:1020 在 Windows10 上使用 Selenium 的 ChromeDriver v87/Chrome v87 无法从节点连接错误中读取描述符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64924676/