[python-win32] Unexpected exception in gateway method 'AddTypeLib'with own Active Script Host

Johan Lindvall johan.lindvall at gmail.com
Mon Aug 28 08:22:28 CEST 2006


On 8/26/06, Mark Hammond <mhammond at skippinet.com.au> wrote:
>
> Could  you try executing win32com\client\makepy.py as a script (eg, from a cmd-prompt),  then select the typelib from the list that will be displayed, and see if it  works there?  According to the traceback, win32com believes it successfully  generated the file, but then failed to locate it.

Makepy.py works and generates code for the complete typelib (including
all methods). The generated python file is placed in win32com\gen_py.
By method code I mean code like this:

	def Exit(self):
		"""Exits the application"""
		return self._oleobj_.InvokeTypes(58, LCID, 1, (24, 0), (),)

With AddTypeLib, the partial code for the typelib is placed in a
subdirectory of win32com\gen_py.With partial I mean that there is no
code generated for the methods.

If i delete the generated files and call AddTypeLib, it always fails.
If I call it when there is generated typelib data available, it works.

Thanks

-- 
/Johan.


More information about the Python-win32 mailing list