Skip to content

Commit

Permalink
Merge pull request #227 from rightx2/rightx2
Browse files Browse the repository at this point in the history
Make it work no matter what encoding system uses
  • Loading branch information
dunovank authored Feb 9, 2018
2 parents a1873ad + 7b9f32c commit 7056104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jupyterthemes/stylefx.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def check_directories():
def less_to_css(style_less):
""" write less-compiled css file to jupyter_customcss in jupyter_dir
"""
with open(tempfile, 'w') as f:
with open(tempfile, 'w', encoding='utf8', errors='ignore') as f:
f.write(style_less)
os.chdir(package_dir)
style_css = lesscpy.compile(tempfile)
Expand Down Expand Up @@ -287,11 +287,11 @@ def style_layout(style_less,
style_less += '\n\n'

# read-in notebook.less (general nb style)
with open(nb_style, 'r') as notebook:
with open(nb_style, 'r', encoding='utf8', errors='ignore') as notebook:
style_less += notebook.read() + '\n'

# read-in cells.less (cell layout)
with open(cl_style, 'r') as cells:
with open(cl_style, 'r', encoding='utf8', errors='ignore') as cells:
style_less += cells.read() + '\n'

# read-in extras.less (misc layout)
Expand Down

0 comments on commit 7056104

Please sign in to comment.