python -m uiautomator2 init报错:requests.exceptions.ConnectionError

参考:UiAutomator python-uiautomator2-atx 踩坑记录 (关于 python 与 uiautomator2 版本兼容)

链接:https://testerhome.com/topics/18642

 

Python版本是3.7.0,uiautomator2版本为2.5.8.dev1

[I 200224 15:18:22 init:131] uiautomator2 version: 2.5.8.dev1

python -m uiautomator2 init报错:requests.exceptions.ConnectionError

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='github-mirror.open.netease.com', port=443): Max retries exceeded with url: /openatx/stf-binaries/raw/master/node_modules/minicap-prebuilt/prebuilt/x86/lib/android-22/minicap.so (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000024A20790B70>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

解决办法:

看了参考文章,想到更换软件版本

我把uiautomator2版本换成我另一台主机正常使用版本:

pip show uiautomator2
Name: uiautomator2
Version: 2.5.4
Summary: Python Wrapper for Google Android UiAutomator2 test tool
Home-page: https://github.com/openatx/uiautomator2
Author: codeskyblue
Author-email: codeskyblue@gmail.com
License: MIT
Location: d:\program\anaconda3\lib\site-packages
Requires: Pillow, humanize, six, adbutils, lxml, logzero, requests, retry, Deprecated, progress, whichcraft
Required-by: weditor

再python -m uiautomator2 init,问题解决

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值