comtypes
comtypes copied to clipboard
Cannot use MS Office objects, importing the MSO tlb fails
Hello,
while generating the Python type library equivalents for the MS Office object model (for x86) has always been a bit fragile, it appears that it does not work at all now, at least with Python 3.8 (not sure about recent 3.7s). The symptom is
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported.
This happens with methods on various interfaces (probably randomized by a dictionary hash somewhere). The common factor between all of them is that they have a VARIANT argument, and VARIANT is a union, of course.
I think the reason that it now fails reliably is the recent fix for https://bugs.python.org/issue16575.
Is there some way to work around this limitation, other than using pywin32 instead?
This has been reverted in python for now: https://github.com/python/cpython/pull/17960
@chrullrich @mrginglymus
If the issue remains, please re-open.