During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/usr/local/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f14cfb34d30>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=35341): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f14cfb34d30>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/main.py", line 289, in
main()
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/main.py", line 279, in main
actionsargs.subparser
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/main.py", line 36, in cmd_init
init.install()
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/init.py", line 393, in install
self.setup_atx_agent()
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/init.py", line 351, in setup_atx_agent
self.check_atx_agent_version()
File "/home/xinxin/.local/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), *kw)
File "/home/xinxin/.local/lib/python3.8/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 "/home/xinxin/.local/lib/python3.8/site-packages/retry/api.py", line 33, in __retry_internal
return f()
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/init.py", line 360, in check_atx_agent_version
version = requests.get("http://%s:%d/version" %
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, kwargs)
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, kwargs)
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, send_kwargs)
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=35341): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f14cfb34d30>: Failed to establish a new connection: [Errno 111] Connection refused'))
inxin$ python3 -m uiautomator2 init [I 230317 04:25:32 init:156] uiautomator2 version: 2.16.23 [I 230317 04:25:32 init:373] Install minicap, minitouch [D 230317 04:25:32 init:59] Use cached assets: /home/xinxin/.uiautomator2/cache/minitouch-f7a806902f/minitouch [D 230317 04:25:32 init:238] Push to /data/local/tmp/minitouch:0755 [I 230317 04:25:32 init:379] Android R (sdk:30) has no minicap resource [D 230317 04:25:32 init:256] apk-debug package-info: {'package_name': 'com.github.uiautomator', 'version_name': '2.3.3', 'version_code': 2003003, 'flags': ['DEBUGGABLE', 'HAS_CODE', 'ALLOW_CLEAR_USER_DATA', 'ALLOW_BACKUP'], 'first_install_time': datetime.datetime(2023, 3, 6, 17, 50, 37), 'last_update_time': datetime.datetime(2023, 3, 6, 17, 50, 37), 'signature': 'ae17cd86], past signatures:[', 'path': '/data/app/~~0ij4jhEtv0EyfIx0F_UTGg==/com.github.uiautomator-dvSNR1EFZtxqpoVO3gBEGQ==/base.apk'} [D 230317 04:25:32 init:257] apk-debug-test package-info: {'package_name': 'com.github.uiautomator.test', 'version_name': None, 'version_code': 0, 'flags': ['DEBUGGABLE', 'HAS_CODE', 'ALLOW_CLEAR_USER_DATA', 'ALLOW_BACKUP'], 'first_install_time': datetime.datetime(2023, 3, 6, 17, 50, 38), 'last_update_time': datetime.datetime(2023, 3, 6, 17, 50, 38), 'signature': 'ae17cd86], past signatures:[', 'path': '/data/app/~~qrkYQXi656ZMJiQdjXFcuA==/com.github.uiautomator.test-vW7bagkmL3dqR-FKDgwl_A==/base.apk'} [I 230317 04:25:32 init:391] Already installed com.github.uiautomator apks [D 230317 04:25:32 init:167] Shell: ('/data/local/tmp/atx-agent', 'server', '--stop') [D 230317 04:25:33 init:295] Real version: [0, 10, 0], Expect version: [0, 10, 0] [D 230317 04:25:33 init:167] Shell: ('/data/local/tmp/atx-agent', 'server', '--nouia', '-d', '--addr', '127.0.0.1:7912') [I 230317 04:25:33 init:350] Check atx-agent version [D 230317 04:25:33 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:34 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:34 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:35 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:35 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:36 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:36 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:37 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:37 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 [D 230317 04:25:38 init:359] Forward: local:tcp:35341 -> remote:tcp:7912 Traceback (most recent call last): File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.8/http/client.py", line 1256, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.8/http/client.py", line 1302, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.8/http/client.py", line 1251, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.8/http/client.py", line 1011, in _send_output self.send(msg) File "/usr/local/lib/python3.8/http/client.py", line 951, in send self.connect() File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f14cfb34d30>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/xinxin/.local/lib/python3.8/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/home/xinxin/.local/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=35341): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f14cfb34d30>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/main.py", line 289, in
main()
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/main.py", line 279, in main
actionsargs.subparser
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/main.py", line 36, in cmd_init
init.install()
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/init.py", line 393, in install
self.setup_atx_agent()
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/init.py", line 351, in setup_atx_agent
self.check_atx_agent_version()
File "/home/xinxin/.local/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), *kw)
File "/home/xinxin/.local/lib/python3.8/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 "/home/xinxin/.local/lib/python3.8/site-packages/retry/api.py", line 33, in __retry_internal
return f()
File "/home/xinxin/.local/lib/python3.8/site-packages/uiautomator2/init.py", line 360, in check_atx_agent_version
version = requests.get("http://%s:%d/version" %
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, kwargs)
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, kwargs)
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, send_kwargs)
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/home/xinxin/.local/lib/python3.8/site-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=35341): Max retries exceeded with url: /version (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f14cfb34d30>: Failed to establish a new connection: [Errno 111] Connection refused'))