Skip to content

Commit 906de8f

Browse files
committed
Fix chunk decoding in influxdb08 client.
If the response contains unicode characters, they should be decoded properly.
1 parent d3c3866 commit 906de8f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

influxdb/influxdb08/client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,13 @@ def _query(self, query, time_precision='s', chunked=False):
448448
)
449449

450450
if chunked:
451-
return list(chunked_json.loads(response.content.decode()))
451+
decoded = {}
452+
try:
453+
decoded = chunked_json.loads(response.content.decode())
454+
except UnicodeDecodeError:
455+
decoded = chunked_json.loads(response.content.decode('utf-8'))
456+
finally:
457+
return list(decoded)
452458
else:
453459
return response.json()
454460

0 commit comments

Comments
 (0)
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