GithubHelp home page GithubHelp logo

Comments (2)

codeskyblue avatar codeskyblue commented on May 22, 2024

不是太懂你的需求,贴出来你改的代码我看看

from uiautomator2.

edsion1107 avatar edsion1107 commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.