Skip to content

Loading…

Can not use wmi framework in web module #144

Open
Steely opened this Issue · 0 comments

1 participant

@Steely

Dear ALL
i have a wmi project code simple like this, this code is try to use wmi framework accept windows servwer 2008 hyper-v virtual machines.
vConn = wmi.WMI(moniker='//./root/virtualization')
vConn.Msvm_ComputerSystem()
when i use dos command : python xxx.py it is work fine
but when i use web.py and try to get Msvm_ComputerSystem() obj will get a exception link this
.....................
File "D:\Python25\Lib\site-packages\wmi.py", line 1147, in __getattr

return getattr (self.namespace, attribute)
File "D:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 516, in
__getattr_

raise AttributeError("%s.%s" % (self.username, attr))
AttributeError: winmgmts://./root/virtualization.Msvm_ComputerSystem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.