Could you explain why you're converting it to a bytestring first?