Convert dumped token to bytes if python3