Fixed byte-encoding bug in spe.py for Python 3.x