Problem calling COM Object written in Python

Mark Hammond mhammond at skippinet.com.au
Thu Apr 6 20:02:14 EDT 2000


<rgb122 at my-deja.com> wrote in message
news:8cin8n$dhk$1 at nnrp1.deja.com...
> site = Publisher.loadSite(str(filename))
> return site

What is "site" here?  It sounds like site is a tuple, so the COM
framework is attempting to convert your return value (site) into
a safearray.  You are probably expecting site to be a string or
other simple type?

> The PythonWin Trace Collector gives this friendly output:
>
> Object with win32trace dispatcher created (object=None)
> in _GetDispID_ with LoadSite 8
> in _InvokeEx_ with 1000 1033L 3
> (L'D:\\rbender\\Desktop\\pyTemplate\\brands.xml',) None
> <PyIServiceProvider at 0x210ebfc with obj at 0x202f130>

The fact that no traceback is printed indicates that the error
was not raised by Python code, byt by the PythonCOM framework on
the way out of the function - ie, your function has correctly
returned to the PythonCOM framework, but the error occurs in
re-packing the COM objects from the Python return value.

> Is there some sort of problem passing the string as a
parameter? I'm
> running this under Win2000, so perhaps there's a lovely new
"feature"
> that's cropped up.

Ive been on Win2000 for some time, so its not related to that...

Mark.






More information about the Python-list mailing list