0

Not able to get undetected-chromedriver.exe download file

I am using undetected-chromedriver in Python. I have installed undetected-chromedriver using pip install undetected-chromedriver

Below is my code

import undetected_chromedriver as uc
driver = uc.Chrome()
# Setting Driver Implicit Time out for An Element
driver.implicitly_wait(10)
# Maximize the window
driver.maximize_window()
time.sleep(2000)
print("maxmized window")
driver.get("http://example.net")

Error I am getting with above code once browser is launched is as below

DevTools listening on ws://127.0.0.1:65496/devtools/browser/a66dad5d-073d-478c-a291-e29a127a2ecb        
[15220:11524:0210/192501.116:ERROR:device_event_log_impl.cc(218)] [19:25:01.116] USB: usb_device_handle_win.cc:1046 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[15220:11524:0210/192501.123:ERROR:device_event_log_impl.cc(218)] [19:25:01.123] USB: usb_device_handle_win.cc:1046 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)

https://pypi.org/project/undetected-chromedriver/#history

I need exe of undetected-chromedriver , can you please help

Also while instantiating I am getting can not find declaration, however I have installed pip install undetected-chromedriver enter image description here Thanks in advance

kaliiiiiiiii
  • 925
  • 1
  • 2
  • 21
simond
  • 684
  • 1
  • 10
  • 36
  • Did you got an exception? – kaliiiiiiiii Feb 10 '23 at 12:39
  • Yes, It is not performing any action, it is just launching chrome browser but its kind of stuck – simond Feb 10 '23 at 12:42
  • Where will I get exe for undetected-chrome? – simond Feb 10 '23 at 12:51
  • If the browser launches, there isn't any other `.exe` file needed. Please specify wat you mean by "stuck" – kaliiiiiiiii Feb 10 '23 at 13:13
  • Means it is not launching url – simond Feb 10 '23 at 13:17
  • But i need exe as well.. launching is secondary issue..i have to use hard-coded exe of undetected chrome – simond Feb 10 '23 at 13:19
  • So you're trying to compile your script as an `.exe` file? Or do you allready have issues when running it as a python script? – kaliiiiiiiii Feb 10 '23 at 13:21
  • No i want o launch it from robot script and my requirement is different..i want to use undetected chrome with hard-coded exe path – simond Feb 10 '23 at 13:24
  • Well but your provided code is __Python__, not robo script, and also, using Python, I don't see any reason why you'd want to compile undetected-chromedriver as executable file (.exe) – kaliiiiiiiii Feb 10 '23 at 13:28
  • reason I am doing automation for one site which is only working chrome undetected driver ....normal chrome driver its giving site can not reach error....so I want use static driver exe for that – simond Feb 10 '23 at 13:49
  • @kaliiiiiiiii I have updated details in question with error which I am getting after launch of browser in console of python – simond Feb 10 '23 at 13:58
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/251792/discussion-between-simond-and-kaliiiiiiiii). – simond Feb 10 '23 at 14:00
  • Does this answer your question? [USB: usb\_device\_handle\_win.cc:1020 Failed to read descriptor from node connection error with ChromeDriver v87 / Chrome v87 using Selenium on Windows10](https://stackoverflow.com/questions/65080685/usb-usb-device-handle-win-cc1020-failed-to-read-descriptor-from-node-connectio) – kaliiiiiiiii Feb 10 '23 at 14:09
  • No, it does not answer my question – simond Feb 10 '23 at 14:24
  • But that's exactly the solution to the error-message you provided? – kaliiiiiiiii Feb 10 '23 at 14:27
  • I did not find this chrome flag to enable -enable-new-usb-backend – simond Feb 10 '23 at 14:31
  • Did you tri [answer](https://stackoverflow.com/a/70476264/20443541) then? – kaliiiiiiiii Feb 10 '23 at 14:34
  • Yes i tried it's not working..i tried enabling all flag and no usb connected to my machine..what else is solution? – simond Feb 10 '23 at 14:49

1 Answers1

0

as when I tried to execute the script and using undetected-chromedriver it does not require an executable since it downloads the chromedriver and patches it

Optimized Selenium Chromedriver patch which does not trigger anti-bot services like Distill Network / Imperva / DataDome / Botprotect.io Automatically downloads the driver binary and patches it.

source from here