|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
源码如下:
import uiautomator2 as u2
device = u2.connect('http://192.168.1.5')
print(device.device_info)
报错:E:\pythonProject\Scripts\python.exe "E:/python file/deivce-1.py"
Traceback (most recent call last):
File "E:\python file\deivce-1.py", line 5, in <module>
print(device.device_info)
File "E:\python3.10\lib\site-packages\cached_property.py", line 36, in __get__
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "E:\python3.10\lib\site-packages\uiautomator2\__init__.py", line 883, in device_info
return self.http.get("/info").json()
File "E:\python3.10\lib\site-packages\requests\sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "E:\python3.10\lib\site-packages\uiautomator2\__init__.py", line 215, in request
raise OSError(
OSError: http-request to atx-agent error, can only recover from USB
请问下如何修改呢 |
|