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.
 
Mark.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Johan Lindvall
Sent: Friday, 25 August 2006 8:12 PM
To: Python-win32@python.org
Subject: [python-win32] Unexpected exception in gateway method 'AddTypeLib'with own Active Script Host

Hi,

We are sometimes getting the error below when running a Python script in our app.

We are calling AddTypeLib on the IActiveScript interface.

It always works with VB-scripts and sometimes fails with Python.

What could be the problem?

===============================================
pythoncom error: Unexpected exception in gateway method 'AddTypeLib'
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 332, in
InvokeEx
return self.invokeex(dispid, lcid, wFlags, args, kwargs, serviceProvider)
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 588, in
invokeex
return func(*args)
File
"C:\Python24\Lib\site-packages\win32comext\axscript\client\framework.py",
line 688, in AddTypeLib
gencache.EnsureModule(uuid, self.lcid, major, minor, bForDemand = 1)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 520,
in EnsureModule
module = MakeModuleForTypelib(typelibCLSID, lcid, major, minor,
progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 290,
in MakeModuleForTypelib
return GetModuleForTypelib(typelibCLSID, lcid, major, minor)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 258,
in GetModuleForTypelib
mod = _GetModule(modName)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 629,
in _GetModule
mod = _import_(mod_name)
exceptions.ImportError: No module named
E6F09C5E-5E59-4AC2-B3DE-0A5554BDB9AEx2673x9x4
pythoncom error: Unexpected gateway error
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 332, in
InvokeEx
return self.invokeex(dispid, lcid, wFlags, args, kwargs, serviceProvider)
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 588, in
invokeex
return func(*args)
File
"C:\Python24\Lib\site-packages\win32comext\axscript\client\framework.py",
line 688, in AddTypeLib
gencache.EnsureModule(uuid, self.lcid, major, minor, bForDemand = 1)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 520,
in EnsureModule
module = MakeModuleForTypelib(typelibCLSID, lcid, major, minor,
progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 290,
in MakeModuleForTypelib
return GetModuleForTypelib(typelibCLSID, lcid, major, minor)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 258,
in GetModuleForTypelib
mod = _GetModule(modName)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 629,
in _GetModule
mod = _import_(mod_name)
exceptions.ImportError: No module named
E6F09C5E-5E59-4AC2-B3DE-0A5554BDB9AEx2673x9x4
=====================================================

Thanks

--
/Johan.
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to