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

RecursionError: maximum recursion depth exceeded while calling a Python object #291

Open
old-eight800 opened this issue Dec 5, 2019 · 1 comment

Comments

@old-eight800
Copy link

uiautomator中判断屏幕是否锁屏时,执行如下判断报错,哪位大神帮忙看下是什么问题呀?
逻辑判断
if not d.screenOn:
d.unlock()
报错如下
Traceback (most recent call last):
File "D:\Program Files\Python\Python37\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "D:\Program Files\Python\Python37\lib\threading.py", line 870, in run
self._target(*self._args, **self.kwargs)
File "D:/Program Files/JetBrains/app_project/mainTest.py", line 132, in check_screen
if d.screen == "off":
File "D:\Program Files\Python\Python37\lib\site-packages\uiautomator2_init
.py", line 1405, in getattr
return getattr(self.default_session, attr)
File "D:\Program Files\Python\Python37\lib\site-packages\uiautomator2\session.py", line 674, in getattr
if hasattr(self.server, key):
File "D:\Program Files\Python\Python37\lib\site-packages\uiautomator2_init
.py", line 1405, in getattr
return getattr(self._default_session, attr)
File "D:\Program Files\Python\Python37\lib\site-packages\uiautomator2\session.py", line 674, in getattr
if hasattr(self.server, key):
RecursionError: maximum recursion depth exceeded while calling a Python object

@taofei
Copy link

taofei commented Dec 5, 2019

换个角度,测试机器全部保证屏幕常亮不关闭不就可以。

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

2 participants