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

在加载的时候出现以下代码,并且退出进程,请问怎么解决? #1

Closed
adf123 opened this issue Oct 19, 2021 · 6 comments

Comments

@adf123
Copy link

adf123 commented Oct 19, 2021

Traceback (most recent call last):
File "E:/炉石/lushi_script-main/lushi.py", line 309, in
main()
File "E:/炉石/lushi_script-main/lushi.py", line 304, in main
agent.run()
File "E:/炉石/lushi_script-main/lushi.py", line 144, in run
states, rect = self.check_state()
File "E:/炉石/lushi_script-main/lushi.py", line 255, in check_state
lushi, image = find_lushi_window()
File "E:/炉石/lushi_script-main/lushi.py", line 27, in find_lushi_window
win32gui.SetWindowPos(hwnd, win32con.HWND_TOPMOST, 0,0,0,0, win32con.SWP_NOMOVE | win32con.SWP_NOSIZE)
pywintypes.error: (5, 'SetWindowPos', '拒绝访问。')

进程已结束,退出代码为 1

@zhoubin-me
Copy link
Owner

@adf123
Copy link
Author

adf123 commented Oct 19, 2021

@adf123 https://www.zhihu.com/question/68342805

这个试过,以管理员身份运行会进行1层之后的加载时候再次退出并出现上述代码

@zhoubin-me
Copy link
Owner

@adf123 可能是杀毒软件的问题。CommandLine 用管理员身份打开也不行么,再运行可行么?

@Tmer0408
Copy link

碰到相同的情况,请问有没有解决后来?

@blacksilvergeek
Copy link
Collaborator

我两台机器win11下出现了这个问题,win10没有

@zhoubin-me
Copy link
Owner

zhoubin-me commented Oct 22, 2021

注释掉27行可解决

# win32gui.SetWindowPos(hwnd, win32con.HWND_TOPMOST, 0,0,0,0, win32con.SWP_NOMOVE | win32con.SWP_NOSIZE)

Huangyan0804 pushed a commit that referenced this issue Nov 17, 2021
从源项目合并代码
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

4 participants