Hi,<br><br>We are sometimes getting the error below when running a Python script in our app.<br><br>We are calling AddTypeLib on the IActiveScript interface.<br><br>It always works with VB-scripts and sometimes fails with Python.
<br><br>What could be the problem?<br><br>===============================================<br>pythoncom error: Unexpected exception in gateway method
'AddTypeLib'<br>Traceback (most recent call last):<br>File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 332,
in<br><u>InvokeEx</u><br>return self.<u>invokeex</u>(dispid, lcid, wFlags, args,
kwargs, serviceProvider)<br>File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 588,
in<br><u>invokeex</u><br>return
func(*args)<br>File<br>"C:\Python24\Lib\site-packages\win32comext\axscript\client\framework.py",<br>line
688, in AddTypeLib<br>gencache.EnsureModule(uuid, self.lcid, major, minor,
bForDemand = 1)<br>File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 520,<br>in
EnsureModule<br>module = MakeModuleForTypelib(typelibCLSID, lcid, major,
minor,<br>progressInstance, bForDemand = bForDemand, bBuildHidden =
bBuildHidden)<br>File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 290,<br>in
MakeModuleForTypelib<br>return GetModuleForTypelib(typelibCLSID, lcid, major,
minor)<br>File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
258,<br>in GetModuleForTypelib<br>mod = _GetModule(modName)<br>File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 629,<br>in
_GetModule<br>mod = _<u>import</u>_(mod_name)<br>exceptions.ImportError: No
module named<br>E6F09C5E-5E59-4AC2-B3DE-0A5554BDB9AEx2673x9x4<br>pythoncom
error: Unexpected gateway error<br>Traceback (most recent call last):<br>File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 332,
in<br><u>InvokeEx</u><br>return self.<u>invokeex</u>(dispid, lcid, wFlags, args,
kwargs, serviceProvider)<br>File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 588,
in<br><u>invokeex</u><br>return
func(*args)<br>File<br>"C:\Python24\Lib\site-packages\win32comext\axscript\client\framework.py",<br>line
688, in AddTypeLib<br>gencache.EnsureModule(uuid, self.lcid, major, minor,
bForDemand = 1)<br>File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 520,<br>in
EnsureModule<br>module = MakeModuleForTypelib(typelibCLSID, lcid, major,
minor,<br>progressInstance, bForDemand = bForDemand, bBuildHidden =
bBuildHidden)<br>File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 290,<br>in
MakeModuleForTypelib<br>return GetModuleForTypelib(typelibCLSID, lcid, major,
minor)<br>File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
258,<br>in GetModuleForTypelib<br>mod = _GetModule(modName)<br>File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 629,<br>in
_GetModule<br>mod = _<u>import</u>_(mod_name)<br>exceptions.ImportError: No
module named<br>E6F09C5E-5E59-4AC2-B3DE-0A5554BDB9AEx2673x9x4<br>=====================================================<br><br>Thanks<br><br>-- <br>/Johan.<br>