-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
C-pyPython BindingsPython BindingsI-defectSomething is not working as intendedSomething is not working as intendedJ-issue-templateApplied to issues not following the template, or missing information.Applied to issues not following the template, or missing information.OS-windows
Description
Description
WebDriver cannot be used
when running any code that uses webdriver, an error appears.
.../errorhandler.py", line 168, in check_response
if len(value) == 1:
^^^^^^^^^^
TypeError: object of type 'int' has no len()
the injury occurred spontaneously, after I had not used selenium for 30-40 days.
it does not depend on the code, any program that I make creates such an error.
at first I tried it on the old version, then I upgraded to the new one. the error did not go away.
it happens in any kind of webdriver usage, when connecting to the browser via debug port or when just launching any browser
Reproducible Code
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://example.com/')
driver.quit()
Full Error
Traceback (most recent call last):
File "c:\Users\user\AppData\Local\Temp\from selenium import webdriver.py", line 4, in <module>
driver = webdriver.Chrome()
^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 47, in __init__
super().__init__(
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 69, in __init__
super().__init__(command_executor=executor, options=options)
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 257, in __init__
self.start_session(capabilities)
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 356, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 447, in execute
self.error_handler.check_response(response)
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 168, in check_response
if len(value) == 1:
^^^^^^^^^^
TypeError: object of type 'int' has no len()
Metadata
Metadata
Assignees
Labels
C-pyPython BindingsPython BindingsI-defectSomething is not working as intendedSomething is not working as intendedJ-issue-templateApplied to issues not following the template, or missing information.Applied to issues not following the template, or missing information.OS-windows