-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on running pihealth.py #3
Comments
When you run the command: vcgencmd measure_temp do you get a response? |
VCHI initialization failed |
Looks like other people have had this issue with vcgencmd in the past (e.g. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=50262). You can try some of the solutions other people have found or you can simply comment out the python lines that are grabbing CPU temperature (lines 27-32). |
sudo vcgencmd measure_temp gives the correct result. Permissions on /dev/vchiq are correct. I will look for another solution and send feedback. |
Have you tried running the Python script with sudo? sudo python pihealth.py |
That’s what i do now and that works. It’s a system that is exposed to the On Sat, Aug 13, 2016 at 6:18 PM, jrbail01 [email protected] wrote:
|
Error i got when trying to run the pihealth.py file |
Here's a working, proper fix: Line 21
Credit to https://forums.pimoroni.com/t/enviro-plus-examples-error/11080/2 |
Traceback (most recent call last): File "pihealth.py", line 80, in <module> main() File "pihealth.py", line 27, in main cpu_temperature = get_cpu_temperature() File "pihealth.py", line 21, in get_cpu_temperature return float(output[output.index('=') + 1:output.rindex("'")]) ValueError: substring not found
Raspberry Pi B+
Linux 30ir000 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux
PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
The text was updated successfully, but these errors were encountered: