请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Original error: Error: read ECONNRESET

使用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

正在回答 回答被采纳积分+3

1回答

Mushishi 2021-03-21 22:04:47

端口德问题,你把端口更改一下。就是配置文件里面

1 回复 有任何疑惑可以回复我~
  • 提问者 慕盖茨3546819 #1
    端口配置yaml文件是吧,我看里面有bp:4900和port:4700两个都要改吗,是不是改一下以后就都好了是吧,还是每次都要修改?
    回复 有任何疑惑可以回复我~ 2021-03-21 23:06:43
  • Mushishi 回复 提问者 慕盖茨3546819 #2
    adb  uninstall io.appium.uiautomator2.server
    adb  uninstall io.appium.uiautomator2.server.test
    你试一试这个方法。如果还有问题再追问
    回复 有任何疑惑可以回复我~ 2021-03-22 22:17:07
  • 提问者 慕盖茨3546819 回复 Mushishi #3
    嗯,我把这两个卸载,再把appiumsetting 也卸载,再把自己的app卸载,重启,还是这样的,不是太管用,一般每次报这个的时候,遇到的失败元素还不一定,但单个跑的时候脚本都是能通过的,这个稳定性我无法很多脚本一起跑,一般跑几个就失败了,有点扎心。
    回复 有任何疑惑可以回复我~ 2021-03-25 23:19:28
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信