From 11182a9593539eac1c5e7ad3675f7ac672f04185 Mon Sep 17 00:00:00 2001 From: Kurt Bendl Date: Thu, 5 Jun 2014 15:20:31 -0600 Subject: [PATCH] Must decode json in python 3 . Assume default utf8 encoding. --- influxdb/client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/influxdb/client.py b/influxdb/client.py index 8372846d..50a305e5 100644 --- a/influxdb/client.py +++ b/influxdb/client.py @@ -255,7 +255,13 @@ def query(self, query, time_precision='s', chunked=False): status_code=200 ) - return json.loads(response.content) + try: + res = json.loads(response.content) + except TypeError: + # must decode in python 3 + res = json.loads(response.content.decode('utf8')) + + return res # Creating and Dropping Databases # pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy