C:\own\app\python_code\.venv\Scripts\python.exe C:\own\app\python_code\work\IBL_click_all\click_all.py
Traceback (most recent call last):
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connection.py", line 198, in _new_conn
sock = connection.create_connection(
(self._dns_host, self.port),
...<2 lines>...
socket_options=self.socket_options,
)
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
raise err
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
~~~~~~~~~~~~^^^^
ConnectionRefusedError: [WinError 10061] 対象のコンピューターによって拒否されたため、接続できませんでした。
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
response = self._make_request(
conn,
...<10 lines>...
**response_kw,
)
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connectionpool.py", line 493, in _make_request
conn.request(
~~~~~~~~~~~~^
method,
^^^^^^^
...<6 lines>...
enforce_content_length=enforce_content_length,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connection.py", line 494, in request
self.endheaders()
~~~~~~~~~~~~~~~^^
File "C:\own\app\python\Lib\http\client.py", line 1333, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\own\app\python\Lib\http\client.py", line 1093, in _send_output
self.send(msg)
~~~~~~~~~^^^^^
File "C:\own\app\python\Lib\http\client.py", line 1037, in send
self.connect()
~~~~~~~~~~~~^^
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connection.py", line 325, in connect
self.sock = self._new_conn()
~~~~~~~~~~~~~~^^
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connection.py", line 213, in _new_conn
raise NewConnectionError(
self, f"Failed to establish a new connection: {e}"
) from e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x00000219527A0E90>: Failed to establish a new connection: [WinError 10061] 対象のコンピューターによって拒否されたため、接続できませんでした。
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\own\app\python_code\work\IBL_click_all\click_all.py", line 25, in <module>
driver = webdriver.Remote(
command_executor='http://localhost:4723', # Appium Server 地址
options=options # 使用 options 替代 desired_caps
)
File "C:\own\app\python_code\.venv\Lib\site-packages\appium\webdriver\webdriver.py", line 249, in __init__
super().__init__(
~~~~~~~~~~~~~~~~^
command_executor=command_executor,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
client_config=client_config,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "C:\own\app\python_code\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 261, in __init__
self.start_session(capabilities)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "C:\own\app\python_code\.venv\Lib\site-packages\appium\webdriver\webdriver.py", line 342, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
File "C:\own\app\python_code\.venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 451, in execute
response = cast(RemoteConnection, self.command_executor).execute(driver_command, params)
File "C:\own\app\python_code\.venv\Lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 404, in execute
return self._request(command_info[0], url, body=data)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\own\app\python_code\.venv\Lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 428, in _request
response = self._conn.request(method, url, body=body, headers=headers, timeout=self._client_config.timeout)
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\_request_methods.py", line 143, in request
return self.request_encode_body(
~~~~~~~~~~~~~~~~~~~~~~~~^
method, url, fields=fields, headers=headers, **urlopen_kw
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\_request_methods.py", line 278, in request_encode_body
return self.urlopen(method, url, **extra_kw)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\poolmanager.py", line 459, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connectionpool.py", line 871, in urlopen
return self.urlopen(
~~~~~~~~~~~~^
method,
^^^^^^^
...<13 lines>...
**response_kw,
^^^^^^^^^^^^^^
)
^
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connectionpool.py", line 871, in urlopen
return self.urlopen(
~~~~~~~~~~~~^
method,
^^^^^^^
...<13 lines>...
**response_kw,
^^^^^^^^^^^^^^
)
^
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connectionpool.py", line 871, in urlopen
return self.urlopen(
~~~~~~~~~~~~^
method,
^^^^^^^
...<13 lines>...
**response_kw,
^^^^^^^^^^^^^^
)
^
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\connectionpool.py", line 841, in urlopen
retries = retries.increment(
method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
)
File "C:\own\app\python_code\.venv\Lib\site-packages\urllib3\util\retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=4723): Max retries exceeded with url: /session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000219527A0E90>: Failed to establish a new connection: [WinError 10061] 対象のコンピューターによって拒否されたため、接続できませんでした。'))
Process finished with exit code 1