win32com, string array --> Type mismatch?

Harry Pehkonen harry.pehkonen at hotpop.com
Fri Aug 8 16:07:50 EDT 2003


I'm running WRQ's Reflection telnet client
(win32com.client.Dispatch("Reflection2.Session")).  It appears I can
only do late binding.  There is one method that takes a ``string
array,'' and fails with:

Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "Reflection.py", line 549, in goto_switch
    result = self.connection.WaitForStrings(waitfor_strngs)
  File "Reflection.py", line 399, in WaitForStrings
    options)
  File "<COMObject Reflection2.Session>", line 2, in WaitForStrings
com_error: (-2147352571, 'Type mismatch.', None, 1)

I've tried providing lists and tuples of strings, lists and tuples of
unicode strings.

makepy -i reports:

    Warning - could not load registered typelib

Without the -i, it creates CLSID
0DE5A6C0-4B0D-101B-AC7B-04021C007002.py, but when I run the telnet
client, COM Browser says it's F29799A0-4B0C-101B-AC7B-04021C007002
(off a bit).  The 0DE...py module mentions this CLSID F29...

I tried renaming and importing the 0DE...py file, but I still get the
Type mismatch.

In short, is there something specific I need to do in order to pass a
``string array'' from Python to a COM server when I'm (I think) stuck
with late binding?

Thanks!
Harry.

PS.  Please reply to this group as I get a ton of spam.




More information about the Python-list mailing list