Skip to content

Commit

Permalink
Fixes encoding error when opening OpenResearch's queries file (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigonogueira4 authored May 28, 2020
1 parent a6a968a commit d55531a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/python/openresearch/retrieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d55531a

Please sign in to comment.