Update build_gallery.py

fix windows build_gallery bug
pull/857/head
Bin Lu 2021-06-16 18:17:50 +08:00 committed by GitHub
parent d9ed534193
commit 4159ebdf8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ def split_datafile(data_file, image_root, delimiter="\t"):
'''
gallery_images = []
gallery_docs = []
with open(data_file) as f:
with open(data_file, 'r', encoding='utf-8') as f:
lines = f.readlines()
for i, line in enumerate(lines):
line = line.strip().split(delimiter)