Skip to content

Commit

Permalink
Merge pull request #29 from pazembrz/utf-fix
Browse files Browse the repository at this point in the history
fix utf errors
  • Loading branch information
david-caro committed Sep 7, 2018
2 parents 1cf207a + 933872f commit 2132e65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plotextractor/extractor.py
Expand Up @@ -302,7 +302,7 @@ def extract_captions(tex_file, sdir, image_list, primary=True):
commas_okay=commas_okay))

for filename in filenames:
filename = str(filename)
filename = filename.encode('utf-8', 'ignore')
if cur_image == '':
cur_image = filename
elif type(cur_image) == list:
Expand Down
2 changes: 1 addition & 1 deletion plotextractor/output_utils.py
Expand Up @@ -226,7 +226,7 @@ def get_image_location(image, sdir, image_list, recurred=False):
# image is a list, not good
return None

image = str(image)
image = image.encode('utf-8', 'ignore')
image = image.strip()

figure_or_file = '(figure=|file=)'
Expand Down

0 comments on commit 2132e65

Please sign in to comment.