Issue
raspberry pi System temperature will not retrieve from the script
import datetime
import os
Time_Stamp = datetime.datetime.now()
temp = os.popen("cat /sys/class/thermal/temp").readline()
RPi_Temp = int(temp) / 1000
The above lines is not retrieve the temperature.
Solution
The mention path "cat /sys/class/thermal/temp"
is wrong:
Time_Stamp = datetime.datetime.now()
temp = os.popen("cat /sys/class/thermal/thermal_zone0/temp").readline()
RPi_Temp = int(temp) / 1000
Answered By - shamal