replace base64.encodestring to base64.b64encode