0

Estoy realizando un codigo sencillo con python para abrir chrome y entrar a twitter, pero al momento de iniciar el programa se para y crashea.

El codigo:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

def login(driver):
    driver.get('https://twitter.com/home')
    time.sleep(4)

def main():
    options = webdriver.ChromeOptions() 
    options.add_argument("start-maximized")
    driver = webdriver.Chrome(options=options ,executable_path=r'C:\Users\Maxi\Proyectos Python\Selenium Robots\chromedriver.exe')
    login(driver)

main()

Este es el errror:

[12776:13276:0116/141657.956:ERROR:device_event_log_impl.cc(211)] [14:16:57.956] Bluetooth: bluetooth_adapter_winrt.cc:1073 Getting Default Adapter failed. [12776:13276:0116/141657.958:ERROR:device_event_log_impl.cc(211)] [14:16:57.959] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [12776:13276:0116/141657.962:ERROR:device_event_log_impl.cc(211)] [14:16:57.963] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [12776:13276:0116/141657.963:ERROR:device_event_log_impl.cc(211)] [14:16:57.963] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)

1 respuesta 1

0

No sé a qué se debe el error. Pero te podría dar algunas ideas para probar:

  • Prueba a quitar el parámetro options.
  • Actualiza Selenium:

python3 -m pip install —upgrade selenium

  • Descarga nuevamente el driver de chrome, en su versión más reciente.
  • Alternativamente puedes probar a usar geckodriver para Firefox.

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.