use encode() and decode() when using subprocess