Skip to content

Commit

Permalink
MNT: Add explicit encode.
Browse files Browse the repository at this point in the history
This fixes weird failures building docs.
dopplershift committed Jul 14, 2016
1 parent d979d10 commit 5c97b89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source/notebook_gen_sphinxext.py
Original file line number Diff line number Diff line change
@@ -57,10 +57,10 @@ def write_nb(dest, output, resources):
name = resources['metadata']['name']
with open(rst_file, 'w') as rst:
header = '=' * len(name)
rst.write(header + '\n')
rst.write(name + '\n')
rst.write(header + '\n')
rst.write(output)
rst.write(header.encode('utf-8') + b'\n')
rst.write(name.encode('utf-8') + b'\n')
rst.write(header.encode('utf-8') + b'\n')
rst.write(output.encode('utf-8'))

imgdir = os.path.join(dest, resources['metadata']['imgdir'])
if not os.path.exists(imgdir):

0 comments on commit 5c97b89

Please sign in to comment.