[python-win32] Help with: pywintypes.com_error: (-2147418113, 'Catastrophic failure', None, None)?

Ray Schumacher rays at blue-cove.com
Thu Jan 29 16:48:57 EST 2004


>>> from win32com.client import *
>>> util = Dispatch("EDREUTLX.EDREUtlXCtrl.1")
>>> util
<win32com.gen_py.EDRE Utility Control._DEDREUtlX instance at 0x11224288>
>>> # pop-up, no args
... util.AboutBox()
Traceback (most recent call last):
  File "<stdin>", line 2, in ?
  File "C:\Python23\lib\site-packages\win32com\gen_py\8AA34F82-95C9-11D3-8EB6-00
C0DF2247CAx0x3x5.py", line 34, in AboutBox
    return self._oleobj_.InvokeTypes(-552, LCID, 1, (24, 0), (),)
pywintypes.com_error: (-2147418113, 'Catastrophic failure', None, None)

So, the util class Dispatches, but _all_ calls (properties and functions) give 'Catastrophic failure'
Is this really some sort of types problem with this OCX?

Thanks for any and all help,
Ray



Test run below, kitchen sink included:

C:\projects\CV-Mini>python
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from win32com.client import *
>>> util = gencache._GetModule('8AA34F82-95C9-11D3-8EB6-00C0DF2247CAx0x3x5')
>>> gencache.GetGeneratedFileName('8AA34F82-95C9-11D3-8EB6-00C0DF2247CA',0,3,5)
'AA34F82-95C9-11D3-8EB6-00C0DF2247Cx0x3x5'
>>> gencache.MakeModuleForTypelib('8AA34F82-95C9-11D3-8EB6-00C0DF2247CAx0x3x5',0
,3,5)
>>> gencache.GetModuleForCLSID('8AA34F82-95C9-11D3-8EB6-00C0DF2247CA')
>>> gencache.GetClassForCLSID('8AA34F82-95C9-11D3-8EB6-00C0DF2247CA')
>>> gencache.GetModuleForProgID('EDREUTLX.EDREUtlXCtrl.1')
<module 'win32com.gen_py.8AA34F82-95C9-11D3-8EB6-00C0DF2247CAx0x3x5' from 'C:\Py
thon23\lib\site-packages\win32com\gen_py\8AA34F82-95C9-11D3-8EB6-00C0DF2247CAx0x
3x5.pyc'>
>>> gencache.EnsureModule('{8AA34F82-95C9-11D3-8EB6-00C0DF2247CA}',0,3,5)
<module 'win32com.gen_py.8AA34F82-95C9-11D3-8EB6-00C0DF2247CAx0x3x5' from 'C:\Py
thon23\lib\site-packages\win32com\gen_py\8AA34F82-95C9-11D3-8EB6-00C0DF2247CAx0x
3x5.pyc'>
>>> gencache.EnsureModule('EDREUTLX.EDREUtlXCtrl.1',0,3,5)
>>> util = Dispatch("EDREUTLX.EDREUtlXCtrl.1")
>>> util
<win32com.gen_py.EDRE Utility Control._DEDREUtlX instance at 0x11224368>
>>> gencache.EnsureDispatch(util)
<win32com.gen_py.EDRE Utility Control._DEDREUtlX instance at 0x11224728>
>>>
>>> util = Dispatch("EDREUTLX.EDREUtlXCtrl.1")
>>> util
<win32com.gen_py.EDRE Utility Control._DEDREUtlX instance at 0x11224288>
>>> # pop-up, no args
... util.AboutBox()
Traceback (most recent call last):
  File "<stdin>", line 2, in ?
  File "C:\Python23\lib\site-packages\win32com\gen_py\8AA34F82-95C9-11D3-8EB6-00
C0DF2247CAx0x3x5.py", line 34, in AboutBox
    return self._oleobj_.InvokeTypes(-552, LCID, 1, (24, 0), (),)
pywintypes.com_error: (-2147418113, 'Catastrophic failure', None, None)
>>> # a property
... util.Version
Traceback (most recent call last):
  File "<stdin>", line 2, in ?
  File "C:\Python23\lib\site-packages\win32com\client\__init__.py", line 451, in
 __getattr__
    return self._ApplyTypes_(*args)
  File "C:\Python23\lib\site-packages\win32com\client\__init__.py", line 445, in
 _ApplyTypes_
    return self._get_good_object_(self._oleobj_.InvokeTypes(*((dispid, 0, wFlags
, retType, argTypes) + args)), user, resultCLSID)
pywintypes.com_error: (-2147418113, 'Catastrophic failure', None, None)
>>>




More information about the Python-win32 mailing list