Can not use wmi framework in web module #144

Open
Steely opened this Issue Mar 12, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@Steely

Steely commented Mar 12, 2012

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