PowerOutage again!

This is the error I’m getting.

Traceback (most recent call last):
File “/home/brewpi/brewpi.py”, line 39, in
from serial import SerialException
File “/usr/local/lib/python2.7/dist-packages/serial/init.py”, line 21, in
from serial.serialposix import *
ValueError: bad marshal data (unknown type code)

I had to reinstall and this was the message. So i just restarted the Pi to see what would happen and its all Running now.

A quick google search seems to suggest that this happens when the compiled python files (.pyc) are corrupt. Deleting them is the fix. That corruption might be caused by the power outage, and if your SD card is corrupt, a fresh install might be a good idea.

If you get power outages regularly, this UPS might be a good idea: http://www.piups.net/
It shuts down the pi correctly in case of an outage.

The reviews that I have read on pi ups say that it goes through batteries pretty quickly which doesn’t seem to be cost effective or maybe a hassle to constantly change out.

It seems to have a charging function. I thought the purpose was was to provide power long enough to send the shutdown signal and wait for a neat shut down.

It seems to support both options. I think that it indeed won’t run the pi for long on batteries. I suggested using it only to shutdown on power outage to prevent file system corruption.

Maybe I just miss reading but it seems like the batteries drain while not actually doing anything. I found this to at a cheaper price http://www.modmypi.com/raspberry-pi/breakout-boards/pi-modules/ups-pico