I am trying to get a Python script to show the temperature for the CPU, GPU and other available sensors in my hardware, but I did not find anything useful.
I tried using WMI to get these values, but my processor is apparently not supported.
The code I used was:
import wmi w = wmi.WMI(namespace="root\wmi") temperature_info = w.MSAcpi_ThermalZoneTemperature()[0] print temperature_info.CurrentTemperature
which I received from another stackoverflow, and I raise a Traceback error (last last call):
File "C:/Users/Joe/Desktop/test.py", line 3, in <module> temperature_info = w.MSAcpi_ThermalZoneTemperature()[0] File "C:\Python27\lib\site-packages\wmi.py", line 819, in query handle_com_error () File "C:\Python27\lib\site-packages\wmi.py", line 241, in handle_com_error raise klass (com_error=err) x_wmi: <x_wmi: Unexpected COM Error (-2147217396, 'OLE error 0x8004100c', None, None)>
which, according to Microsoft support, means Not Supported (0x8004100C) I tried to run a version of this code on the command line in the cmd.exe window running as an administrator, but I got the same error.
Is there any other way to access the temperatures of the processor and GPU?
PS: My OS is Windows 10, and my processor is AMD FX-8350. I am not sure if my operating system or my processor is mistaken for this error.
source share