Home >Backend Development >Python Tutorial >Why Does Chrome v87 Cause USB Communication Errors with Selenium in Windows 10?
USB Communication Issues in Chrome v87 with Selenium in Windows 10
Recently, users have encountered an error with Chrome Driver v87 and Chrome v87 concerning USB communication:
[ERROR:device_event_log_impl.cc(211)] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
Impact of Chrome Update on USB Communication
This error indicates a change in how Chrome manages USB connections. As a result, even basic selenium scripts are triggering this error.
Resolution: Suppressing Error Messages
While this error does not affect the functionality of Selenium scripts, it can be annoying. To suppress these error messages, you can use an experimental option:
options.add_experimental_option('excludeSwitches', ['enable-logging'])
Updated Code Block
from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument("start-maximized") options.add_experimental_option('excludeSwitches', ['enable-logging']) driver = webdriver.Chrome(options=options, executable_path=r'C:\WebDrivers\chromedriver.exe') driver.get('https://www.google.com/')
Conclusion
This workaround suppresses the error messages by disabling logging in Chrome. Although it doesn't resolve the actual issue with USB communication, it provides a way to enjoy a cleaner console output while using Selenium with the latest versions of Chrome and Chrome Driver.
The above is the detailed content of Why Does Chrome v87 Cause USB Communication Errors with Selenium in Windows 10?. For more information, please follow other related articles on the PHP Chinese website!