Open sn260591 opened 6 months ago
Should be fixed by #2219.
@CristiFati I tried with a wheel from the latest action: https://github.com/mhammond/pywin32/actions/runs/9586723045 (pywin32-306-cp39-cp39-win_amd64.whl
) and this is still the result I get:
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)?
@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. Here's all the successful CI build jobs that ran on main: https://github.com/mhammond/pywin32/actions/workflows/main.yml?query=branch%3Amain+is%3Asuccess
You can do the same by looking at actions from a PR.
I'm experiencing a funny problem. Investigating: What does the following line output:
python -c "import win32api as wapi;print(wapi.GetLastError());wapi.SetLastError(0);print(wapi.GetLastError())"
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:
def enum_windows_proc(hwnd, extra): print(hwnd) return False
win32gui.EnumWindows(enum_windows_proc, None)