re-raise exception in pack
use cStringIO for binarypack.pack