0


parcharm+selenium+webdriver+chrome报错

D:\pythonins\python.exe F:\parcharm\pythonProject\selenium_test.py
Traceback (most recent call last):
File “F:\parcharm\pythonProject\selenium_test.py”, line 2, in
driver = webdriver.Chrome()
^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\selenium\webdriver\chrome\webdriver.py”, line 64, in init
super(WebDriver, self).init(DesiredCapabilities.CHROME[‘browserName’], “goog”,
File “D:\pythonins\Lib\site-packages\selenium\webdriver\chromium\webdriver.py”, line 78, in init
RemoteWebDriver.init(
File “D:\pythonins\Lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 172, in init
self.start_session(capabilities, browser_profile)
File “D:\pythonins\Lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 269, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 336, in execute
response = self.command_executor.execute(driver_command, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\selenium\webdriver\remote\remote_connection.py”, line 350, in execute
return self._request(command_info[0], url, body=data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\selenium\webdriver\remote\remote_connection.py”, line 373, in _request
resp = self._conn.request(method, url, body=body, headers=headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3_request_methods.py”, line 144, in request
return self.request_encode_body(
^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3_request_methods.py”, line 279, in request_encode_body
return self.urlopen(method, url, **extra_kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\poolmanager.py”, line 432, in urlopen
conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\poolmanager.py”, line 303, in connection_from_host
return self.connection_from_context(request_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\poolmanager.py”, line 328, in connection_from_context
return self.connection_from_pool_key(pool_key, request_context=request_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\poolmanager.py”, line 351, in connection_from_pool_key
pool = self._new_pool(scheme, host, port, request_context=request_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\poolmanager.py”, line 265, in _new_pool
return pool_cls(host, port, **request_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\connectionpool.py”, line 195, in init
timeout = Timeout.from_float(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\util\timeout.py”, line 186, in from_float
return Timeout(read=timeout, connect=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\util\timeout.py”, line 115, in init
self._connect = self._validate_timeout(connect, “connect”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\pythonins\Lib\site-packages\urllib3\util\timeout.py”, line 152, in _validate_timeout
raise ValueError(
ValueError: Timeout value connect was <object object at 0x000002A4198287B0>, but it must be an int, float or None.

Process finished with exit code 1
运行from selenium import webdriver
driver = webdriver.Chrome()

标签: selenium chrome python

本文转载自: https://blog.csdn.net/scpxzjb/article/details/140552827
版权归原作者 大魏安定公宇文泰 所有, 如有侵权,请联系我们删除。

“parcharm+selenium+webdriver+chrome报错”的评论:

还没有评论