-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Hanging/Freezing when calling comtypes.client.CreateObject #507
Comments
Hi, When upgrading from Python 3.10.7 to Python 3.11.7, please check if there have been any changes in the version for Moreover, you seem to be masking the arguments passed to |
I did not have any change in what release version of comtypes was used. I used v1.2.0 on Python 3.10, and tried both v1.2.0 and v1.2.1 on my current version of Python 3.11. [[package]]
name = "comtypes"
version = "1.2.0"
description = "Pure Python COM package"
category = "main"
optional = false
python-versions = "*"
files = [
{file = "comtypes-1.2.0-py2.py3-none-any.whl", hash = "sha256:26f261b1eed6972d5cdaa3af1fadb3fa76fc59877d0a1293835327a76573380d"},
{file = "comtypes-1.2.0.zip", hash = "sha256:c8f2f0e995d73baf0bd899a948d62adeb9ab908c8270c66a67ff09dfcf4872b7"},
] I can share yes, but I don't think it will be replicable here unless someone else has this software, which is why I neglected to list them. obj = comtypes.client.CreateObject("VideoReDoPro6.VideoReDoSilent") |
Thanks for the infomation. It is indeed that I do not have VideoReDo and I cannot run your script in my environment. Please try to revert poetry settings to its previous state and see if the same script works. Keep in mind, even if there is no problem with Python or If this happens even after reverting the poetry setting, Windows Update may be the cause. |
I've tried 3.10.11, 3.10.7, and 3.9.7. They all hang. I tried 1.2.1 and 1.2.0 on both.
When I kill the VideoReDo process I get this error. I see another issue with a similar error: #198 I should also note asking the Developers of VideoReDo for assistance isn't unfortunately an option as the developer has unfortunately passed away some time ago. |
I think that Windows Update is probably the cause of this problem, after all. I saw #198 during the inventory of issues I did when I became the maintainer of this project, but it had not been active for several years and I was not sure what the reporter was facing. It is unfortunate and sad that the COM library you want to use is not currently supported. However, it may be one way to wait for the next Windows Update, like pywinauto/pywinauto#1350. |
A newer build is being released after If you could try this and let us know how it went, the community can use it as a reference on what to do in the future when something similar happens. |
It's still happening on |
Have you contacted MS technical support? Also, in the VideoReDo user community, are there people who have encountered similar situations? |
Is there an update on this issue? |
I've tried many times since to try find out why, and I cannot figure out anything. I doubt asking Microsoft for support will do anything I've asked them before in live chat, call, and remote support for much simpler stuff and they can barely go through task manager. |
I think there might be developers using the VideoReDo COM interface, not limited to I'm not sure that the error you're facing can be fixed by modifying the implementation of The results may provide clues to a solution. |
I dont know of any communities that really use it like how I do, other than the late dev. However, trying to start it via PowerShell doesn't work, unless I set compatibility mode to Windows 8, which I then end up with a COMObject. But, trying to do anything with it makes it act like the If I try to access it in Python interpreter directly it starts the process much like PowerShell did, but never ends/finishes the
If I kill the process in task manager I get the above. Trying the same code but by saving to a .py script and calling it, does the exact same thing. |
Ok, I don't know why at all. But, if I uninstall and reinstall VideoReDo, no luck. However, If I uninstall VideoReDo, search for and delete any and all possible ReDo or COM on Python shell: $ python
Python 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import comtypes
>>> import comtypes.client
>>> comtypes.CoInitialize()
>>> vrd_silent = comtypes.client.CreateObject("VideoReDoPro6.VideoReDoSilent")
>>> vrd_silent.VRDInterface.ProgramGetVersionNumber
'6.93.7.836 - Mar 23 2022' COM in my project (working): Either way, doing that seemed to fix it, meaning this wasn't a |
Glad to hear that your problem has been resolved.
I think there are common problems in the world that can be resolved in a way like this. It's not hard to imagine such complex dependencies related to graphics and sounds within VideoReDo.
Never mind. |
This hasn't happened to me the last time I ran an exact bit of code. The only thing that changed was my Python version. I would have gone from I believe Python 3.10.7 to Python 3.11.7, where it now freezes. Some Windows updates likely went on through then as well.
I used venv via Python poetry and started with a clean venv with no result.
While I do call
comtypes.client.CreateObject(...)
it is actually freezing at theobj = comtypes.CoCreateInstance(...)
line within it, and to be specific again, freezing at_ole32.CoCreateInstance(...)
within that.Environment:
Debug Logs:
The text was updated successfully, but these errors were encountered: