enthought / enthought/comtypes

object has no attribute '__ctypes_from_outparam__' error when number of arguments in a function is >= 32.

Open
#203 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Python
Stars
345
Forks
105
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.