首页 > 解决方案 > 无法从节点连接读取描述符:连接到系统的设备未运行。(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 脚本之后调用了其他任何内容,它就会挂起。

有没有人知道为什么会突然发生这种情况?

标签: pythonselenium

解决方案


推荐阅读