[python-win32] automation error on VB CreateObject

Emmanuel Breton emmanuel.breton at logilab.fr
Thu Jul 29 10:19:28 CEST 2004


On Thu, Jul 29, 2004 at 08:43:33AM +1000, Mark Hammond wrote:
> I suggest you follow the steps for debugging Python COM objects - ie,
> register with "--debug", and start the Pythonwin "Remote Trace Collector".
> Hopefully this will cause the error to be dumped to Pythonwin, shedding some
> light.
> 
> Mark
> 

Thanks for the piece of advice :)
Now, the problem seems to come from gateways... 

from VB: On command 
o = CreateObject("PythonDemos.Server")
----error------>
Object with win32trace dispatcher created (object=None)
pythoncom error: CPyFactory::CreateInstance failed to get gateway to returned object
exceptions.ValueError: argument is not a COM object

Whereas, from pythonWin: 
>>> o = win32com.client.Dispatch("PythonDemos.Server")
----success------>
Object with win32trace dispatcher created (object=None)
>>> o.SplitString("hi there")
in _Invoke_ with 1000 0 1 (u'hi there',)
(u'hi', u'there')
>>> 

does the following trace makes sense to you?

-- 
Emmanuel Bréton                                 LOGILAB, Paris (France)
Tel: 01 45 32 03 12                              http://www.logilab.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.python.org/pipermail/python-win32/attachments/20040729/efddb0a4/attachment.pgp


More information about the Python-win32 mailing list