1

Please. I have tried every google search result and none of them worked. The closest thing I have is this (from this website) that doesn't give me any errors but also doesn't return anything.

import wmi
w = wmi.WMI(namespace="root\OpenHardwareMonitor")
temperature_infos = w.Sensor()
for sensor in temperature_infos:
    if sensor.SensorType==u'Temperature':
        print(sensor.Name)
        print(sensor.Value)

All I need is for this (or anything else) to return my cpu's internal temperature.

Jack Deeth
  • 3,062
  • 3
  • 24
  • 39
Jman470x
  • 11
  • 1
  • 2
    Does this answer your question? [Accessing CPU temperature in python](https://stackoverflow.com/questions/3262603/accessing-cpu-temperature-in-python) – Jack Deeth Feb 08 '22 at 03:46
  • First thing I tried, the code up there is from that. All the others either gave me weird errors or I couldn't find the actual commands to figure out how to use them. – Jman470x Feb 08 '22 at 03:48
  • are you certain your computer has a CPU temperature sensor? if the above prints nothing, I would assume either tempatature_infos is an empty list, or the sensortype is never Temperature – Zachary Craig Feb 08 '22 at 14:41

0 Answers0