FAQ
Mark Hammond <mhammond at skippinet.com.au> wrote in message news:<RKEua.6539$_o4.90224 at news-server.bigpond.net.au>...
You should just be able to run makepy, then use win32com.client.Dispatch
as normal. Evertthing should "just work" (but unfortunately doesn't for
some).
com_error: (-2147352567, 'Exception occurred.', (0, 'TGLLib', 'Type
mismatch', None, 1000013, -2146828275)
This means that TGLLib itself threw an exception. This often means that
you passed an incorrect type.

Can you post the complete interactive session, and the traceback. Also
please include a "print repr(ob)" in the output, where "ob" is the COM
object you are trying to call.
Hi Mark,
Here's the interactive session...
from win32com.client import Dispatch
myTGL = Dispatch("TGLLib.TGLFile")
print repr(myTGL)
<win32com.gen_py.22E8D31A-01EE-4EB1-9AED-07264C052957x0x25x0._TGLFile>
myTGL.Filename="D:\myTGL.tgl"
myTGL.Load()
print repr(myTGL.Strings)
<win32com.gen_py.22E8D31A-01EE-4EB1-9AED-07264C052957x0x25x0._TGLStrings>
myTGL.Strings.Lookup()
(None, u'')
myTGL.Strings.Add(Name=u'Name', Data=u'This is my data',
Media=u'media.wav')
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "D:\Python22\Lib\site-packages\win32com\gen_py\22E8D31A-01EE-4EB1-9AED-07264C052957x0x25x0.py",
line 65, in Add
return self._ApplyTypes_(0x60030003, 1, (9, 0), ((16392, 3),
(16392, 3), (16392, 3), (16396, 19)), 'Add',
'{248731B8-8D33-4B18-9219-240086A375F6}',Name, Data, Media, Key)
File "D:\Python22\Lib\site-packages\win32com\client\__init__.py",
line 341, in _ApplyTypes_
return self._get_good_object_(apply(self._oleobj_.InvokeTypes,
(dispid, 0, wFlags, retType ,argTypes ) + args), user, resultCLSID)
com_error: (-2147352567, 'Exception occurred.', (0, 'TGLLib', 'Type
mismatch', None, 1000013, -2146828275), None)
>>>

Hope it sheds some light on things...

Simon

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedMay 8, '03 at 5:00p
activeMay 9, '03 at 9:58a
posts3
users2
websitepython.org

2 users in discussion

Simon Withers: 2 posts Mark Hammond: 1 post

People

Translate

site design / logo © 2022 Grokbase