该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

脚本自动运行一段时间后会卡死,然后报错:

出错点不定,都是在POST之后手机端没有响应

利用USB有线连接能够正常执行,报错如下具体log在截图

Traceback (most recent call last):

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen

chunked=chunked,

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request

six.raise_from(e, None)

File "", line 3, in raise_from

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 416, in _make_request

httplib_response = conn.getresponse()

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 1336, in getresponse

response.begin()

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 306, in begin

version, status, reason = self._read_status()

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 275, in _read_status

raise RemoteDisconnected("Remote end closed connection without"

http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\process.py", line 297, in _bootstrap

self.run()

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\process.py", line 99, in run

self._target(*self._args, **self._kwargs)

File "D:\Android_Test\test.py", line 102, in android_devices

self.upload_test()

File "D:\Android_Test\test.py", line 255, in upload_test

self.driver.swipe(start_x=0, start_y=1200, end_x=500, end_y=1200, duration=200)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\appium\webdriver\extensions\action_helpers.py", line 127, in swipe

action.perform()

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\appium\webdriver\common\touch_action.py", line 136, in perform

self._driver.execute(Command.TOUCH_ACTION, params)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 319, in execute

response = self.command_executor.execute(driver_command, params)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 374, in execute

return self._request(command_info[0], url, body=data)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 397, in _request

resp = self._conn.request(method, url, body=body, headers=headers)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\request.py", line 80, in request

method, url, fields=fields, headers=headers, **urlopen_kw

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\request.py", line 171, in request_encode_body

return self.urlopen(method, url, **extra_kw)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\poolmanager.py", line 330, in urlopen

response = conn.urlopen(method, u.request_uri, **kw)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen

method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\util\retry.py", line 400, in increment

raise six.reraise(type(error), error, _stacktrace)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\packages\six.py", line 734, in reraise

raise value.with_traceback(tb)

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen

chunked=chunked,

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request

six.raise_from(e, None)

File "", line 3, in raise_from

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 416, in _make_request

httplib_response = conn.getresponse()

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 1336, in getresponse

response.begin()

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 306, in begin

version, status, reason = self._read_status()

File "C:\Users\21966\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 275, in _read_status

raise RemoteDisconnected("Remote end closed connection without"

urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Logo

一站式 AI 云服务平台

更多推荐