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)
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.