Pythoncom error when calling method

kevin_mcfarlane at my-deja.com kevin_mcfarlane at my-deja.com
Tue Nov 21 05:17:41 EST 2000


Hi Mark,

Thanks for the help. I had in fact eventually tried this and found that
it worked. However, another oddity is that when I tried to run the
Excel COM example, it worked on the first run. Then, on subsequent
invocations it produced a transparent window. I haven't run makepy in
this case though.

BTW, I'm very impressed with Python as a scripting language. Also the
Pythonwin IDE is very good, considering it's free and presumably was
written principally by yourself?

I discovered Python about a couple of weeks ago and it's a refreshing
change from Perl, which I've grown to dislike with a vengeance! Though
it is admittedly very powerful.

At present, I'm evaluating Python for future release at the company I'm
working for. It's not clear yet whether it will be used. However, I
shall certainly be evangelising it in the future.

Kevin
In article <3A19AAAA.10401 at ActiveState.com>,
  Mark Hammond <MarkH at ActiveState.com> wrote:
> kevin_mcfarlane at my-deja.com wrote:
>
> > Hi,
> >
> > Python 2.0 on Windows 95 OSR2
> >
> > I am having trouble calling an ActiveX method of the form:
> >
> > sequence = sequenceFile.GetSequence(0)
> >
> > It produces the following error:
> >
> > File "c:\python20\win32com\client\dynamic.py", line 429, in
__getattr__
> >     raise pythoncom.com_error, details
> > com_error: (-2147352567, 'Exception occurred.',
(0, 'TSAPI', 'Expected
> > 1 positional (non-named) parameters; found 0.', None, 0, -17808),
None)
>
> This error is caused by the ActiveX control returning a non-standard
> error when queried for a property that doesnt exist.  That query is
made
> internally by win32com, so it is not anything you are doing wrong.
>
> The only real solution is to run "makepy" over the ActiveX type
library.
>   This will cause win32com to know that GetSequence() is a real
method,
> and will avoid the step causing it to fail.
>
> Mark.
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list