From d55531a738d2cf9e14c376d798d2de4bd3020b6b Mon Sep 17 00:00:00 2001 From: Rodrigo Frassetto Nogueira Date: Thu, 28 May 2020 13:36:42 -0400 Subject: [PATCH] Fixes encoding error when opening OpenResearch's queries file (#1239) --- src/main/python/openresearch/retrieve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/python/openresearch/retrieve.py b/src/main/python/openresearch/retrieve.py index 08cee75fac..7082cd9982 100644 --- a/src/main/python/openresearch/retrieve.py +++ b/src/main/python/openresearch/retrieve.py @@ -57,7 +57,7 @@ with open(args.output, 'w') as fout: start_time = time.time() - for line_number, line in tqdm(enumerate(open(args.qid_queries))): + for line_number, line in tqdm(enumerate(open(args.qid_queries, encoding='utf-8'))): query_id, query = line.strip().split('\t') # We return one more result because it is almost certain that we will # retrieve the document that originated the query.