-
Notifications
You must be signed in to change notification settings - Fork 792
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
EnumWindows() throws an exception if the callback returns False #2163
Comments
Should be fixed by #2219. |
@CristiFati I tried with a wheel from the latest action: https://github.com/mhammond/pywin32/actions/runs/9586723045 ( Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32gui
>>> win32gui.EnumDesktopWindows # Just making sure I am using a build from main
<built-in function EnumDesktopWindows>
>>> def enum_windows_proc(hwnd, extra):
... print(hwnd)
... return False
...
>>> win32gui.EnumWindows(enum_windows_proc, None)
66112
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pywintypes.error: (126, 'EnumWindows', 'The specified module could not be found.') |
@Avasam: any way for me to get the .whl (to avoid local build)? |
In the link I shared, if you scroll down to "artefacts" there's a download button. You can do the same by looking at actions from a PR. |
I'm experiencing a funny problem. Investigating:
What about if running each of the 4 lines separately in the interpreter console? |
Expected behavior
No exceptions.
Actual behavior
Throwing an exception
pywintypes.error: (126, 'EnumWindows', 'The specified module could not be found.')
Steps to reproduce the problem
Run this code:
Python 3.11.7, pywin32 306
The text was updated successfully, but these errors were encountered: