[python-win32] Error with VixCom operation; TypeError: The VARIANT type is unknown (0x00000015)
Tim Roberts
timr at probo.com
Wed Feb 18 01:40:13 CET 2009
Vinay Anantharaman wrote:
> 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)
>
It's ironic that you posted this the same day as the other recent COM
question, because it is exactly the same problem. VARIANT type 0x15 is
VT_UI8 -- a 64-bit integer. It's kind of loony for an API to use a
64-bit integer as an error number, but that's what they're doing.
As Mark said, pywin32 doesn't support VT_UI8 at all. There may be a
hacky way to do this with comtypes.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list