[python-win32] com error

Mark Hammond mhammond at skippinet.com.au
Wed Nov 9 00:32:55 CET 2005


> Hi Mark
>
> Not sure if I got what you suggested correct. The
> method I am trying to use is defined as:
>
> def SyncWrite(self, NumItems=defaultNamedNotOptArg,
> ServerHandles=defaultNamedNotOptArg,
> Values=defaultNamedNotOptArg),
> Errors=pythoncom.Missing):

There appears to be an extra close paren there...

> I have tried calling this different ways:
> grpPinWheel.SyncWrite(NumItems=num, ServerHandles=sh,
> Values=listval, Errors=errors)
> grpPinWheel.SyncWrite(NumItems=num, ServerHandles=sh,
> Values=listval, Errors=pythoncom.Missing)

Try pythoncom.Empty too.  You should find from the decls at the top of the
generated file that 'defaultNamedNotOptArg' is actually pythoncom.Empty -
and that is what I assumed would be used for 'Errors'.  It appears however
that pythoncom.Missing is *already* being used for that param.

Sadly though, this may be a red herring, and the problem may be related to
the types of the other params.  Without more useful info from the object
itself, it is very hard to speculate.

Mark



More information about the Python-win32 mailing list