2020-03-18 17:42:22.904 | ERROR | __main__:crawler:128 - 出现异常,异常信息如下:
2020-03-18 17:42:23.273 | ERROR | __main__:crawler:129 - Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/local/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.6/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/local/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/hrpc/transport/http.py", line 23, in send
r = requests.post(self.endpoint, data=json.dumps(req), headers={'Content-Type': 'application/json'})
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cmcm/itest/cmautotest/uiautotest/AirMonkey/run.py", line 98, in crawler
crawler_obj.fast_crawler_start()
File "/home/cmcm/itest/cmautotest/uiautotest/AirMonkey/utils/crawler.py", line 165, in fast_crawler_start
real_allow_ele = self.poco_obj.poco.wait_for_any(permission_allow_list, timeout=5)
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/pocofw.py", line 128, in wait_for_any
if obj.exists():
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/proxy.py", line 72, in wrapped
return func(proxy, *args, **kwargs)
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/proxy.py", line 774, in exists
return self.attr('visible')
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/proxy.py", line 39, in wrapped
return func(self, *args, **kwargs)
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/proxy.py", line 734, in attr
nodes = self._do_query(multiple=False)
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/proxy.py", line 872, in _do_query
self._nodes = self.poco.agent.hierarchy.select(self.query, multiple)
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/utils/retry.py", line 20, in wrapped
raise ex
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/utils/retry.py", line 15, in wrapped
return func(*args, **kwargs)
File "/home/cmcm/.local/lib/python3.6/site-packages/poco/utils/hrpc/hierarchy.py", line 33, in select
return self.selector.select(query, multiple)
File "/usr/local/lib/python3.6/site-packages/hrpc/object_proxy.py", line 92, in __call__
return self._client__.evaluate(self.__call_no_evaluate__(remote_obj_cache, *args))
File "/usr/local/lib/python3.6/site-packages/hrpc/client.py", line 63, in evaluate
self.transport.send({'id': reqid, 'uri': obj_proxy._uri__, 'method': obj_proxy._invocation_path__})
File "/usr/local/lib/python3.6/site-packages/hrpc/transport/http.py", line 26, in send
raise TransportDisconnected(e)
hrpc.exceptions.TransportDisconnected: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
描述问题bug Ubuntu: 14.04.3 LTS 报错语句:poco.wait_for_any(permission_allow_list, timeout=5) 场景:利用AirTest/poco对APP进行深度遍历 特点:偶现
复现步骤 利用AirTest/poco对APP进行深度遍历,暂无复现
预期效果 (预期想要得到什么、见到什么)
相关截图 (贴出遇到问题时的截图内容,如果有的话)
python 版本:
python 3.6.4
poco 版本:
poco==0.96.9 pocoui==1.0.78
设备: abi: arm64-v8a cpuPlatform: msm8996 manufacturer: GOOGLE model: Pixel network: 未连接网络,通过STF连接设备 openGLESVersion: 3.2 platform: Android product: sailfish sdk: 25 version: 7.1.2
其他相关环境信息 (其他运行环境,例如在linux ubuntu16.04上运行异常,在windows上正常。)