On 04/08/2011 21:21, Mitch Oliver wrote:
I am attempting to work through WMI to control some Hyper-V VMs.  I am
unable to call GetText_.

Given the following code:
import wmi

c = wmi.WMI(computer='remoteserver', namespace='virtualization')
mgtSvcs = c.Msvm_VirtualSystemManagementService()[0]
mgtSvcs.GetText_(1)

Returns an AttributeError:
AttributeError: '<win32com.gen_py.Microsoft WMI Scripting V1.2
Library.ISWbemObject instance at 0x63756808>' object has no attribute
'GetText_'

Well I'm glad that Matt has chipped in with the results from his
installation, because I was going to ask if could piggyback onto
his rig to test this out...

I've got no clear answer, but I'd like to see the full traceback,
not just the last line (just to ensure where the error's really
happening. Also, try mgsSvcs.methods and/or mgsSvcs.properties
to see what wmi has picked up for this object.

Also, print mgsSvcs to make sure it's what you think it is...

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

Reply via email to