Hi,

I am trying to translate an error into text by using a library function in vix 
com:
       
http://www.vmware.com/products/beta/vmware_server/vix_api/ReferenceGuide/lang/com/functions/GetErrorText.html

My code is as follows:
        vixLib = win32com.client.gencache.EnsureDispatch('VixCom.VixLib') 
        vixLib.GetErrorText(4, None)
        
Instead of getting some explanation that a file was not found I get an 
exception:
        File 
"C:\Users\vinaya\AppData\Local\Temp\gen_py\2.4\7A474EE3-0062-4239-AE91-134AC9BD5FD3x0x1x0.py",
 line 1316, in GetErrorText
    , locale)
TypeError: The VARIANT type is unknown (0x00000015)

The code in that function is:
        def GetErrorText(self, err=defaultNamedNotOptArg, 
locale=defaultNamedNotOptArg):
                """method GetErrorText"""
                # Result is a Unicode object - return as-is for this version of 
Python
                return self._oleobj_.InvokeTypes(2, LCID, 1, (8, 0), ((21, 1), 
(8, 1)),err
                        , locale)

I'm not really sure what to do. Instead of using the library I can create a 
small script to take the error codes from the HTML documentation and convert it 
into a dictionary. But that is a hassle to maintain.

Thanks,

Vinay Anantharaman

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

Reply via email to