From 28e7063ac42066423f74332f1f610175dd90efd8 Mon Sep 17 00:00:00 2001 From: Martino Luca Date: Thu, 15 Nov 2018 09:21:41 -0800 Subject: [PATCH] [Perf] Do not fail when encountering non-ASCII chars in JSON payloads Reviewed By: mbouaziz Differential Revision: D13084118 fbshipit-source-id: 4df1d9ee8 --- infer/lib/python/inferlib/bucklib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/lib/python/inferlib/bucklib.py b/infer/lib/python/inferlib/bucklib.py index f9e1940fb..111181d87 100644 --- a/infer/lib/python/inferlib/bucklib.py +++ b/infer/lib/python/inferlib/bucklib.py @@ -114,7 +114,7 @@ class NotFoundInJar(Exception): def load_json_report(opened_jar, path): try: - return json.loads(opened_jar.read(path).decode()) + return json.loads(opened_jar.read(path).decode('utf-8')) except KeyError: raise NotFoundInJar