Closed Vendo232 closed 3 years ago
Hi, I have the same problem here. BananaPi with Armbian 21.02.3 Stretch with Linux 5.11.3-sunxi The script returns:
/bin/sh: 1: vcgencmd: not found Traceback (most recent call last): File "/home/stlas/raspimon/src/rpi-cpu2mqtt.py", line 198, in
cpu_temp = check_cpu_temp() File "/home/stlas/raspimon/src/rpi-cpu2mqtt.py", line 54, in check_cpu_temp cpu_temp = str(p).replace('\n', ' ').replace('\r', '').split("=")[1].split("'")[0] IndexError: list index out of range
Thanx for helping
This is because the script is not run on raspbian - vcgencmd is a custom command for geting rpi cpu temperature. I have updated the script to post 0 if retrieving the cpu temperature fails - you can test again.
Hello
I
m running RPi4 with Ubuntu fpr RPI and this is the error I
m getting. Any idea what is wrong?ubuntu@ubuntu:~/rpimonitor$ /usr/bin/python3.8 rpi-cpu2mqtt.py /bin/sh: 1: vcgencmd: not found Traceback (most recent call last): File "rpi-cpu2mqtt.py", line 198, in
cpu_temp = check_cpu_temp()
File "rpi-cpu2mqtt.py", line 54, in check_cpu_temp
cpu_temp = str(p).replace('\n', ' ').replace('\r', '').split("=")[1].split("'")[0]