Closed duanhonggo closed 2 years ago
我用的这个库 https://pypi.org/project/retry/
你pip3 show retry
看看版本什么的对比对?
非常感谢,已经解决,retry版本是一样的,我在pycharm虚拟环境中会报错,在电脑本地的python环境下调试正常
那你看了为什么报错的吗? 在2021年05月18日 08:58,duanhonggo 写道:
非常感谢,已经解决,retry版本是一样的,我在pycharm虚拟环境中会报错,在电脑本地的python环境下调试正常
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
@.***": "http://schema.org",
@.***": "EmailMessage",
"potentialAction": {
@.***": "ViewAction",
"target": "https://github.com/openatx/adbutils/issues/43#issuecomment-842742780",
"url": "https://github.com/openatx/adbutils/issues/43#issuecomment-842742780",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
@.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
是这样的,我在我录屏的装饰器模块decorator.py中,调用了你tidevice 中的利用wda图片流合成mp4的方法: elif env('system_type') == 'ios': import wda from untils.uitest_screenrecord import make_screenrecord record_path = '../record/' filename = 'ios' + func.name + get_now_time_num() + '.mp4' t = tidevice.Device() client = wda.USBClient() client.unlock() e_sign = False error = None with make_screenrecord(c=client, t=t, output_video_path=record_path + file_name): try: func(*args, **kwargs) except Exception as e: error = e e_sign = True time.sleep(2) with open(record_path + file_name, 'rb+') as f: record_read = f.read() allure.attach(record_read, "这条用例的录像视频", attachment_type=allure.attachment_type.MP4) if e_sign: raise error else: raise SystemTypeError
其中的improt wda写在了文件顶部,我在该模块下调试demo.py下调试 adbutils,会报错,将import wda 写道局部,就是上面那串代码,就不会报错。我认为并不是调用adbutils代码引发的
现在已经找到解决问题的方法,但是背后的机制,我还没有弄明白
import adbutils
d = adbutils.AdbClient(host="127.0.0.1", port=5037)
我在调试这句代码时,报了下面的错误: