Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行东方头条中的home异常 #8

Open
mengrennwpu opened this issue Oct 29, 2019 · 2 comments
Open

运行东方头条中的home异常 #8

mengrennwpu opened this issue Oct 29, 2019 · 2 comments

Comments

@mengrennwpu
Copy link

mengrennwpu commented Oct 29, 2019

pocoui包已经安装,且usb连接已打开设备连接,cmd中运行adb devices可以正常检测设备,但是运行结果报如下异常,异常中的G未被赋值,请教下是安装配置问题还是其他原因,烦请指点,感谢!

运行环境:win 10,pocoui版本:1.0.78, python版本:3.7

Traceback (most recent call last):
File "D:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\pydevd.py", line 1758, in
main()
File "D:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\pydevd.py", line 1752, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "D:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev\pydevd.py", line 1147, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\Program Files\JetBrains\PyCharm Community Edition 2019.1.2\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/python_workspace/python_study/pocoui/east_news.py", line 531, in
dftt.run()
File "E:/python_workspace/python_study/pocoui/east_news.py", line 58, in run
home()
File "D:\Program Files\python3.7\lib\site-packages\airtest\utils\logwraper.py", line 78, in wrapper
res = f(*args, **kwargs)
File "D:\Program Files\python3.7\lib\site-packages\airtest\core\api.py", line 242, in home
G.DEVICE.home()
AttributeError: 'NoneType' object has no attribute 'home'

@xingag
Copy link
Owner

xingag commented Nov 6, 2019

这句话可以注释掉,可能不兼容

@Yznx04
Copy link

Yznx04 commented Dec 7, 2019

我也遇到了这个,然后我的手机是vivo Android。注释掉home后又出现stop_app出错。然后把stop_app注释掉后就会出现等待广告元素异常,然后就被异常退出。
等待广告元素异常
Waiting timeout for appearance of "UIObjectProxy of "com.songheng.eastnews:id/aoy""
Traceback (most recent call last):
File "C:/Users/26879/Desktop/yangmao/%E4%B8%9C%E6%96%B9%E5%A4%B4%E6%9D%A1/东方头条.py", line 545, in
dftt.run()
File "C:/Users/26879/Desktop/yangmao/%E4%B8%9C%E6%96%B9%E5%A4%B4%E6%9D%A1/东方头条.py", line 77, in run
self.__pre_and_skip_ads()
File "C:/Users/26879/Desktop/yangmao/%E4%B8%9C%E6%96%B9%E5%A4%B4%E6%9D%A1/东方头条.py", line 441, in pre_and_skip_ads
poco('com.songheng.eastnews:id/g
').wait_for_appearance(120)
File "E:\venv\yangmao\lib\site-packages\poco\proxy.py", line 681, in wait_for_appearance
raise PocoTargetTimeout('appearance', self)
poco.exceptions.PocoTargetTimeout: Waiting timeout for appearance of "UIObjectProxy of "com.songheng.eastnews:id/g
""
[09:55:16][DEBUG]<airtest.core.android.adb> E:\venv\yangmao\lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 28e4e44d forward --remove tcp:15739
[09:55:16][DEBUG]<airtest.core.android.adb> E:\venv\yangmao\lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 28e4e44d forward --remove tcp:19755

Process finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants