Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

连接ios设备报错 #118

Open
linyajun558 opened this issue Aug 18, 2022 · 2 comments
Open

连接ios设备报错 #118

linyajun558 opened this issue Aug 18, 2022 · 2 comments

Comments

@linyajun558
Copy link

Traceback (most recent call last):
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection
raise err
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1007, in _send_output
self.send(msg)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 947, in send
self.connect()
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 205, in connect
conn = self._new_conn()
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 440, in send
resp = conn.urlopen(
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8100): Max retries exceeded with url: /status (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\weditor\web\handlers\page.py", line 60, in post
id = connect_device(platform, device_url)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\weditor\web\device.py", line 94, in connect_device
d = _AppleDevice(device_url)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\weditor\web\device.py", line 61, in init
self._scale = c.scale
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\functools.py", line 967, in get
val = self.func(instance)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda_init
.py", line 717, in scale
return self._session_http.get("/wda/screen").value['scale']
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda\utils.py", line 47, in inner
return fn(*args, **kwargs)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda_init
.py", line 457, in _fetch
url = urljoin(self._wda_url, "session", self.session_id,
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda_init
.py", line 693, in session_id
current_sid = self.status()['sessionId']
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\retry\api.py", line 73, in retry_decorator
return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\retry\api.py", line 33, in _retry_internal
return f()
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda_init
.py", line 385, in status
res = self.http.get('status')
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda\utils.py", line 47, in inner
return fn(*args, **kwargs)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda_init
.py", line 460, in fetch
response = httpdo(url, method, data, timeout)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda_init
.py", line 130, in httpdo
return unsafe_httpdo(url, method, data, timeout)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\wda_init
.py", line 157, in _unsafe_httpdo
response = request_session.request(method,
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "C:\Users\10010008\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8100): Max retries exceeded with url: /status (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

@sifuma
Copy link

sifuma commented Jan 12, 2024

我也是这个问题,请问大神有解决吗?

@linyajun558
Copy link
Author

有一个思路你可以试下,把appium 的apk删除,然后排查下端口,是否被占用,我现在可以了。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants