[Solved] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection…

USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: The devices connected to the system are not functioning.

When executing automated tests in python + selenium + pytest, I encountered the following error.

[25612:15512:0220/162104.300:ERROR:device_event_log_impl.cc(211)] [16:21:04.299] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection:
 The devices connected to the system are not functioning.(0x1F)

At present, the reason has not been found and can only be solved by violence:

Add the following options when starting chrome:

option = webdriver.chromeOptions()

# Prevent printing some useless logs
option.add_experimental_option("excludeSwitches", ['enable-automation', 'enable-logging'])
driver = webdriver.Chrome(chrome_options=option)

 

Supplement

For this statement

driver = webdriver.Chrome(chrome_options=option)

For chrome browsers, chrome_options=option, preferably written as options=option, that is:

driver = webdriver.Chrome(options=option)

Or you’ll see it in terminal

DeprecationWarning: use options instead of chrome_options
  driver = webdriver.Chrome(chrome_options=option)

Read More: