title: how to fix it a bytes-like object is required, not 'str' (python)
body: <p>in my python/django application,i want get information about wallet, but it errors:TypeError: a bytes-like object is required, not 'str', could you please tell me how to solve it</p>
  
  <p>views.py:</p>
  
  <pre><code>def index(request):      
        get_info_payload = {"jsonrpc": "2.0", "params": [], "id": "2", "method": "info"}
  
        rpc_auth = base64.b64encode("%s:%s" % ("admin", "123456"))
        auth_headers = {'Content-Type': 'application/json', 'Authorization': rpc_auth}
  
        post_url = "http://127.0.0.1:8229/rpc"
  
        s = Session()
  
  
        req = Request('POST', post_url, json=get_info_payload, headers=auth_headers)
        prepped = req.prepare()
        resp = s.send(prepped)
  
        return HttpResponse(resp.text)  
  </code></pre>