使用1台机器跑,脚本跑着跑着经常会出现标题中的报错,再继续跑,还会时不时出现。
[HTTP]
self.error_handler.check_response(response)
File “D:\Python\lib\site-packages\appium\webdriver\errorhandler.py”, line 29, in check_response
raise wde
File “D:\Python\lib\site-packages\appium\webdriver\errorhandler.py”, line 24, in check_response
super(MobileErrorHandler, self).check_response(response)
File “D:\Python\lib\site-packages\selenium\webdriver\remote\errorhandler.py”, line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “C:/Users/Administrator/PycharmProjects/AppiumPython/keywords/run_main.py”, line 169, in
run.run_method()
File “C:/Users/Administrator/PycharmProjects/AppiumPython/keywords/run_main.py”, line 37, in run_method
excute_method(element_key, handle_value)
File “C:\Users\Administrator\PycharmProjects\AppiumPython\keywords\action_method.py”, line 35, in on_click
element = self.get_by_local.get_element(args[0])
File “C:\Users\Administrator\PycharmProjects\AppiumPython\util\get_by_local.py”, line 25, in get_element
self.driver.save_screenshot("…/jpg/"+key+".png")
File “D:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 1055, in save_screenshot
return self.get_screenshot_as_file(filename)
File “D:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 1032, in get_screenshot_as_file
png = self.get_screenshot_as_png()
File “D:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 1064, in get_screenshot_as_png
return base64.b64decode(self.get_screenshot_as_base64().encode(‘ascii’))
File “D:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 1074, in get_screenshot_as_base64
return self.execute(Command.SCREENSHOT)[‘value’]
File “D:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 321, in execute
self.error_handler.check_response(response)
File “D:\Python\lib\site-packages\appium\webdriver\errorhandler.py”, line 29, in check_response
raise wde
File “D:\Python\lib\site-packages\appium\webdriver\errorhandler.py”, line 24, in check_response
super(MobileErrorHandler, self).check_response(response)
File “D:\Python\lib\site-packages\selenium\webdriver\remote\errorhandler.py”, line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET
[Logcat] Logcat terminated with code 0, signal null
Process finished with exit code -1