pyvda
pyvda copied to clipboard
_ctypes.COMError
I used getattr
in window.hwnd
to see if the window has been closed. I did this to see if it would generate an exception and it did. The exception was _ctypes.COMError. I've tried to find this in pyvda
and the required packages (comtypes
, pywin32
) but I've been unable to find it. I want to import it so I can contextlib.suppress
the exception.
This works for me on Python 3.11:
>>> from _ctypes import COMError
>>> COMError
<class '_ctypes.COMError'>
Could you post the code that is generating the exception?
I believe I am getting a similar error. After I updated my machine to Windows 11 version 23H2, I got a COMError with the following message "(-2147467262, 'No such interface supported', (None, None, None, 0, None))" after importing pyvda. I have attached a screenshot of the call stack and the error. I am using pyvda version 0.3.2.
Thanks,
having the same issue as @nanosil, i compiled my script with pyvda in it and have it to startup with my pc and running into this traceback error
running the script non compiled runs into same issue, the compiled script was running fine for about a month before this issue and was running fine yesterday and currently runs fine on another pc, running windows 11 2h22 and just upgraded to 2h23 to see if it would help with the issue but does not work on either version
I am seeing the same issue in winver 10.0.18363.836.
I understand that of course you may not have such an old version to test. I'm willing to help in providing data to support the version, if you keep it somewhere (so that it always works, regardless of version)
Windows 11 might be fixed by 0.4.0
, I will run the full test suite on monday
I am seeing the same issue in winver 10.0.18363.836.
I understand that of course you may not have such an old version to test. I'm willing to help in providing data to support the version, if you keep it somewhere (so that it always works, regardless of version)
I'd be happy to accept a PR to support it
I'd be happy to accept a PR to support it
Any ... guidelines on what's missing though? What to look for? How to look for it?
I am good with Python code - but I am a total beginner with regards to "Windows-things".
I do have a virtual-desktop-enhancer.ahk
and a win-10-virtual-desktop-enhancer\libraries\virtual-desktop-accessor.dll
that work tho
I'd be happy to accept a PR to support it
Any ... guidelines on what's missing though? What to look for? How to look for it?
I am good with Python code - but I am a total beginner with regards to "Windows-things".
I do have a
virtual-desktop-enhancer.ahk
and awin-10-virtual-desktop-enhancer\libraries\virtual-desktop-accessor.dll
that work tho
You should only need to modify code in this file: https://github.com/mrob95/pyvda/blob/master/pyvda/com_defns.py
You'll need to add a new BUILD_OVER_19041
variable (based on https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions this is the version after yours) to detect when we are running with your version. Then based on the code for the ahk script or the source code that the dll was built from you should be able to figure out what GUIDs and methods we need on the various objects.
The Makefile has a target for running the tests (requires pytest and pytest-cov) which you can use to validate that everything is working.
If you come across any issues feel free to open a separate issue - I'd like to avoid mixing the new win11 problems with the old win10 problems
Version 0.4.0 fixed it for me. Thank you!
Same issue on OS Build 22631.3296
Same issue on
OS Build 22631.3296
I am using the same version without a problem. Could you make sure you are updated to the latest version (0.4.3
)? If so, could you post the code you are running and the error message?