[python-win32] com error

Michael Johnstone mpjoh1977 at yahoo.com.au
Tue Nov 8 23:59:18 CET 2005

--- Mark Hammond <mhammond at skippinet.com.au> wrote:

> >
> > line 446, in _ApplyTypes_
> >     return self._get_good_object_(
> > com_error: (-2147352567, 'Exception occurred.',
> (0,
> > None, None, None, 0, -2147024809), None)
> The second value in that error tuple is the error
> code provided by the
> object.  It didn't bother to fill in a message, but
> we can get one if it is
> a standard COM error:
> >>> pythoncom.GetScodeString(-2147024809)
> 'The parameter is incorrect.'
> >>>
> I'm not sure why it is throwing that specific error.
>  I guess it may be
> "default params".  Try passing explicit values for
> all params - explicitly
> pass pythoncom.Missing for ones you don't know the
> correct value for (the
> win32com framework will currently be passing
> pythoncom.Empty for them - the
> difference is subtle, but some objects are very
> picky about which one you
> choose (basically, 'Empty' means an empty param will
> be supplied to the
> object, whereas 'Missing' will tell pythoncom to not
> present that argument
> at all))
> Mark
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,

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)

I still get the same error.  I have also tried using
arrays and lists for the variables but these don"t
seem to make a difference>


Do you Yahoo!? 
Listen to over 20 online radio stations and watch the latest music videos on Yahoo! Music. 

More information about the Python-win32 mailing list