huggies15
Posts: 9
Joined: Tue Feb 19, 2013 11:36 am

Sudden script fail

Wed Apr 09, 2014 11:58 am

Hi,

I've been running a Pi to measure water temperatures for about 18 months now no problems. Its constantly on, not updated and run headless.

Yesterday, the Pi started collecting data but froze half way through (I have 2 indicator LEDs red and green, red means processing green means done, the script measures temp for 7 minutes then stops and generates a graph.) The data was only collected for 5 minutes, and there was no final output to give me the graph.

Did the classic off and on again, and the script/program did the same thing.

I VNC'd in, and check it out; loads of space, so the drive isn't full or anything.
I just performed an update (sudo apt-get update && sudo apt-get upgrade) and now when I try and run the script I get python errors:
import: not found (on lines 2-5)
then
word unexpected (expecting ")") (line 6)

not sure what I have done and would be grateful if someone could suggest something!

Cheers,
Steve

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Sudden script fail

Wed Apr 09, 2014 12:15 pm

Try another PSU, poor power can cause the Pi to randomly hang, crash, or cause kernel panics.

Richard S.

huggies15
Posts: 9
Joined: Tue Feb 19, 2013 11:36 am

Re: Sudden script fail

Wed Apr 09, 2014 1:56 pm

Hi,

Thanks for the reply. Its not the power supply, but I think the problem might be the sensor itself. I have 2 systems, so I swapped the sensor over to the other working system and it stopped.

Doing sudo modprobe w1-gpio && sudo modprobe w1-therm followed by cd /sys/bus/w1/devices/ showed that the snesor wasnt even listed.

Looks like a couple of pounds on a new temp probe and see if that sorts it out!

Steve

Return to “Python”