Use requests.content, not requests.text, when getting the public key.