From 835d56cafb8f239c8a3ed4c253dfcaba95c6578f Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 5 Mar 2020 01:10:14 -0800 Subject: ingestrequest_row2json: skip on unicode errors --- python/scripts/ingestrequest_row2json.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/scripts/ingestrequest_row2json.py b/python/scripts/ingestrequest_row2json.py index 065dd3b..563855d 100755 --- a/python/scripts/ingestrequest_row2json.py +++ b/python/scripts/ingestrequest_row2json.py @@ -29,7 +29,10 @@ def run(args): for l in args.json_file: if not l.strip(): continue - req = transform(json.loads(l)) + try: + req = transform(json.loads(l)) + except: + print(l, file=sys.stderr) print(json.dumps(req, sort_keys=True)) def main(): -- cgit v1.2.3