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

_ctypes.COMError #33

Open
phpjunkie420 opened this issue Jan 30, 2024 · 11 comments
Open

_ctypes.COMError #33

phpjunkie420 opened this issue Jan 30, 2024 · 11 comments

Comments

@phpjunkie420
Copy link

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.

@mrob95
Copy link
Owner

mrob95 commented Jan 30, 2024

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?

@nanosil
Copy link

nanosil commented Feb 9, 2024

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,

image

@manfredcoco
Copy link

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
image

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

@stdedos
Copy link
Contributor

stdedos commented Feb 15, 2024

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)

@mrob95
Copy link
Owner

mrob95 commented Feb 16, 2024

Windows 11 might be fixed by 0.4.0, I will run the full test suite on monday

@mrob95
Copy link
Owner

mrob95 commented Feb 16, 2024

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

@stdedos
Copy link
Contributor

stdedos commented Feb 16, 2024

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

@mrob95
Copy link
Owner

mrob95 commented Feb 16, 2024

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

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

@nanosil
Copy link

nanosil commented Feb 16, 2024

Version 0.4.0 fixed it for me. Thank you!

@beratcmn
Copy link

Same issue on OS Build 22631.3296

@mrob95
Copy link
Owner

mrob95 commented Mar 23, 2024

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?

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

6 participants