Skip to content

Commit

Permalink
Specify explicit encoding to avoid UnicodeEncodeError on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
osuchw committed Nov 11, 2019
1 parent 16e2873 commit ac5024c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion altair/sphinxext/altairgallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def main(app):
if next_ex:
example['next_ref'] = "gallery_{name}".format(**next_ex)
target_filename = os.path.join(target_dir, example['name'] + '.rst')
with open(os.path.join(target_filename), 'w') as f:
with open(os.path.join(target_filename), 'w', encoding='utf-8') as f:
f.write(EXAMPLE_TEMPLATE.render(example))


Expand Down

0 comments on commit ac5024c

Please sign in to comment.