Comments (2)
不是太懂你的需求,贴出来你改的代码我看看
from uiautomator2.
python -m uiautomator2 init
2017-12-14 22:58:08,850 - main.py:230 - INFO - Device(FA79E1A06565) initialing ...
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "C:\Python36\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
File "C:\Python36\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\Python36\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "C:\Python36\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn
conn.connect()
File "C:\Python36\lib\site-packages\urllib3\connection.py", line 284, in connect
conn = self._new_conn()
File "C:\Python36\lib\site-packages\urllib3\connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003504FD0>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Python36\lib\site-packages\urllib3\util\retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /codeskyblue/stf-binaries/raw/master/node_modules/minicap-prebuilt/prebuilt/arm64-v8a/lib/android-26/minicap.so (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003504FD0>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python36\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Python36\lib\site-packages\uiautomator2_main.py", line 279, in
main()
File "C:\Python36\lib\site-packages\uiautomator2_main.py", line 275, in main
fire.Fire(MyFire)
File "C:\Python36\lib\site-packages\fire\core.py", line 127, in Fire
component_trace = Fire(component, args, context, name)
File "C:\Python36\lib\site-packages\fire\core.py", line 366, in Fire
component, remaining_args)
File "C:\Python36\lib\site-packages\fire\core.py", line 542, in CallCallable
result = fn(*varargs, **kwargs)
File "C:\Python36\lib\site-packages\uiautomator2_main.py", line 233, in init
ins.install_minicap()
File "C:\Python36\lib\site-packages\uiautomator2_main.py", line 111, in install_minicap
path = cache_download(url)
File "C:\Python36\lib\site-packages\uiautomator2_main.py", line 73, in cache_download
r = requests.get(url, stream=True)
File "C:\Python36\lib\site-packages\requests\api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "C:\Python36\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python36\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python36\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Python36\lib\site-packages\requests\adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /codeskyblue/stf-binaries/raw/master/node_modules/minicap-prebuilt/prebuilt/arm64-v8a/lib/android-26/minicap.so (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003504FD0>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。',))
这里是错误信息。
下载minicap、minitouch等so时,需要联网,但是访问外网必须需要配置代理。
我已经提交了一个PR
from uiautomator2.
Related Issues (20)
- 多台设备,USB没问题,Wifi就会随机几台设备出现adbutils.errors.AdbError: unknown host service
- MacOS M2芯片UIAutomator2无法init HOT 1
- uiautomator2/assets/app-uiautomator.apk' not found HOT 5
- (开头的xpath识别错误 HOT 2
- 使用.child("")后,原XPathSelector对象的xpath表达式被永久修改. HOT 3
- 手动Init时com.github.uiautomator报WindowManagerEventInjector is not supported HOT 2
- NAF控件的属性怎么获取 HOT 1
- Is there any automation running in the headless emulator? HOT 3
- app_current()方法在android13以上版本的适配问题 HOT 1
- 通过sibling获取的文本不会自动更新
- 不同手机不同的resourceId,怎么解决 HOT 1
- 获取的节点没有editable属性,而这个属性是辅助功能默认支持的。 HOT 1
- 鸿蒙Next 如何应对? HOT 3
- packaging.version.InvalidVersion: Invalid version HOT 3
- device_info缺失问题 HOT 1
- 无法查看页面元素结构 HOT 1
- 最新版本3.0.9使用d(text='xxx').click()无法找到元素,旧版本没问题 HOT 2
- 希望能同时判断多个组件中任一一个是否存在
- v3取消了通过wifi连接手机的功能,希望能给加回来 HOT 1
- 执行print(d.info)提示adbutils.errors.AdbError: cannot bind listener: cannot bind to 127.0.0.1:60941: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uiautomator2.