title: AttributeError: 'dict' object has no attribute 'decode'
body: <p>I am trying to run a service even when API link is down but I keep getting the following error: </p>
  
  <pre><code>AttributeError: 'dict' object has no attribute 'decode'.
  </code></pre>
  
  <p>How can I solve this problem? Thank you</p>
  
  <pre><code> *@app.route('/test_api')
      def test_api():
          ipno = "192.168.0.120"
          port = "8060"
  
          url_time = 'https://{}:{}/time/'.format(ipno, port)
          url_member = 'https://{}:{}/member/'.format(ipno, port)
          url_state = 'https://{}:{}/state/'.format(ipno, port)
  
          try:
              r_time = _session.get(url_time).content
  
              r_member = _session.get(url_member).content
  
              r_state = _session.get(url_state).content
          except requests.exceptions.ConnectionError:
              r_uptime = {
                          "uptime": "OFF"
                          }.decode(utf-8)
              r_member ={
                          "groupCount": "OFF",
                        }.decode(utf-8)
              r_state={   "state": "OFF"
                      }.decode(utf-8)
  
  
          return render_template('test_api.html', time = json.loads(r_time), member=json.loads(r_member), state=json.loads(r_state))*
  </code></pre>