comtypes
comtypes copied to clipboard
object has no attribute '__ctypes_from_outparam__' error when number of arguments in a function is >= 32.
We use comtypes to call our library (C++) from Python (>=3.5).
We have encountered following error, which can not be traced by Python debugger.
We are creating the function calls in the following manner.
engine = CreateObject("ProgID")
When the COM function has >= 32 arguments (this is the common property we have observed in errors) exception AttributeError "object has no attribute '__ ctypes_from_outparam __' " is raised.
Although I have applied the suggested changes in issue number #87 and #88 , this does not solve the problem.
Interestingly when engine is created in the following manner,
engine = CreateObject("ProgID", dynamic=True)
The exception disappears, however this reduces usability since user needs to call GetBestInterface on all the com objects returned as they are all IDispatch in that case.
Unfortunately I can not pinpoint from which line this AttributeError is originated as the exception can not be correctly traced in python,
Any help is highly appreciated.