[python-win32] Error in FindPerformanceAttributesByName
mhammond at skippinet.com.au
Fri May 7 22:02:17 EDT 2004
> To resolve this, I downloaded pdh.dll available here
> 6 and put
> it into C:\python22.
That KB article references Windows NT4 - is that what you are running? The
installer probably should try and ensure the latest is installed - I opened
a bug at sourceforge to remind myself.
> >>> import win32pdhutil
> >>> win32pdhutil.ShowAllProcesses()
> Traceback (most recent call last):
> File "<pyshell#3>", line 1, in ?
> File "C:\Python22\Lib\site-packages\win32\lib\win32pdhutil.py", line
> 94, in ShowAllProcesses
> items, instances = win32pdh.EnumObjectItems(None,None,object,
> error: (-1073738824, 'EnumObjectItems for buffer size', 'No error
> message is available')
That error translates to PDH_CSTATUS_NO_OBJECT, which MS document as:
"The specified machine was found, but no matching performance object was
found on that machine. If this status is returned when the counter is being
added, the specified counter is not included in the query. If this status is
returned by an active counter, the data for that counter is invalid. Each
time the data is requested, PDH tries to obtain this counter data."
That doesn't really make a whole lot of sense in this case - but I've no
further ideas I'm afraid (and it does work for me!)
More information about the Python-win32