本文介绍了Python wmi c.Win32_PerfFormattedData_PerfOS_Processor win7错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

>>>对于 c.Win32_PerfFormattedData_PerfOS_Processor() 中的 i:...打印我...回溯(最近一次调用最后一次):文件<stdin>",第 1 行,在 <module> 中文件c:\work\pythonsv\vendor\wmi.py",第 1029 行,在 __getattr__ 中返回 getattr(self._namespace,属性)文件C:\Python25\Lib\site-packages\win32com\client\dynamic.py",第 496 行,在__getattr__引发 AttributeError, "%s.%s" % (self._username_, attr)属性错误:<unknown>.Win32_PerfFormattedData_PerfOS_Processor

谁能解释这个追溯?在 WIN7 机器上进行远程调用.

解决方案

更新:

这有效:即在 cmd --> lodctr/q

[链接] http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/perfmon-problems-unable-to-add-counters/e90f231d-0014-457d-8b1f-5f342971597a

>>> for i in c.Win32_PerfFormattedData_PerfOS_Processor():
...    print i
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\work\pythonsv\vendor\wmi.py", line 1029, in __getattr__
    return getattr (self._namespace, attribute)
  File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 496, in
__getattr__
    raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: <unknown>.Win32_PerfFormattedData_PerfOS_Processor

Anyone could explain this traceback? Made a remote call on WIN7 machine.

解决方案

UPDATE:

this worked: i.e. at cmd --> lodctr /q

[link] http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/perfmon-problems-unable-to-add-counters/e90f231d-0014-457d-8b1f-5f342971597a

这篇关于Python wmi c.Win32_PerfFormattedData_PerfOS_Processor win7错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 19:19