[python-win32] newbie question on calling DynamicPolicy.py from python com client

Nicholas nicholasinparis at gmail.com
Sat Jan 19 18:22:06 CET 2008


Hi,

I have executed tried to call the ch12 example dynamic server "
DynamicPolicy.py" from python client via:

m = win32com.client.Dispatch('PythonDemos.StringModule')
m.split('hello there')

which gives the following error:
pythoncom error: Python error invoking COM method.
<type 'exceptions.TypeError'>: Objects of type 'function' can not be
converted to a COM VARIANT
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 491,
in __getattr__
    raise pythoncom.com_error, details
com_error: (-2147352567, 'Exception occurred.', (0, 'Python COM Server
Internal Error', "Unexpected Python Error: <type 'exceptions.TypeError'>:
Objects of type 'function' can not be converted to a COM VARIANT", None, 0,
-2147467259), None)

Could anyone enlighted me on what I have done wrong?

Thanks

Nicholas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20080119/3a7a6d34/attachment.htm 


More information about the python-win32 mailing list