I've been trying to get a Python script to show temperatures for CPU, GPU and other availabile sensors in my hardware, but I haven't found anything useful.
I tried using WMI to get those 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 got from another stackoverflow thread, and I get thrown the error Traceback (most recent call last):
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 have tried running the command-line version of this code in a cmd.exe window ran as an administrator, but I got the same error.
Is there any other way to access CPU and GPU temperatures?
PS: My OS is Windows 10 and my CPU is AMD FX-8350. I am unsure whether my OS or my CPU are at fault for this error.